samples/trycatchredo/src/org/apidesign/exceptions/trycatchredo/usage/QueryStream.java
1.1 --- a/samples/trycatchredo/src/org/apidesign/exceptions/trycatchredo/usage/QueryStream.java Sun Feb 01 16:29:46 2009 +0100
1.2 +++ b/samples/trycatchredo/src/org/apidesign/exceptions/trycatchredo/usage/QueryStream.java Thu Oct 30 21:30:10 2014 +0100
1.3 @@ -6,13 +6,15 @@
1.4 import java.io.OutputStream;
1.5 import javax.swing.JOptionPane;
1.6
1.7 +// BEGIN: trycatchredo.stream
1.8 public final class QueryStream extends OutputStream {
1.9 private ByteArrayOutputStream arr = new ByteArrayOutputStream();
1.10 /** this field can be manipulated by the QueryException */
1.11 Boolean reverse;
1.12
1.13 @Override
1.14 - public synchronized void write(byte[] b, int off, int len) throws IOException {
1.15 + public synchronized void write(byte[] b, int off, int len)
1.16 + throws IOException {
1.17 if (reverse == null) {
1.18 throw new QueryException();
1.19 }
1.20 @@ -63,3 +65,4 @@
1.21 }
1.22 }
1.23 }
1.24 +// END: trycatchredo.stream