• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package com.fasterxml.jackson.databind.testutil;
2 
3 import java.io.*;
4 
5 public class BrokenStringWriter
6     extends FilterWriter
7 {
8     final String _message;
9 
BrokenStringWriter(String msg)10     public BrokenStringWriter(String msg) {
11         super(new StringWriter());
12         _message = msg;
13     }
14 
15     @Override
write(char[] cbuf, int off, int len)16     public void write(char[] cbuf, int off, int len) throws IOException
17     {
18         throw new IOException(_message);
19     }
20 
21     @Override
write(int c)22     public void write(int c) throws IOException
23     {
24         throw new IOException(_message);
25     }
26 
27     @Override
write(String str, int off, int len)28     public void write(String str, int off, int len)  throws IOException
29     {
30         throw new IOException(_message);
31     }
32 }
33