Package org.apache.axiom.testutils.io
Class ByteStreamComparator
- java.lang.Object
-
- java.io.OutputStream
-
- org.apache.axiom.testutils.io.ByteStreamComparator
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
public class ByteStreamComparator extends OutputStream
OutputStreamimplementation that compares the data written to it with another character sequence specified by anInputStream.
-
-
Constructor Summary
Constructors Constructor Description ByteStreamComparator(InputStream in)Deprecated.ByteStreamComparator(InputStream in, String name1, String name2)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidflush()voidwrite(byte[] buffer, int off, int len)voidwrite(int b)-
Methods inherited from class java.io.OutputStream
nullOutputStream, write
-
-
-
-
Constructor Detail
-
ByteStreamComparator
public ByteStreamComparator(InputStream in, String name1, String name2)
Constructor.- Parameters:
in- the stream to compare toname1- the name of the stream passed as argument; used in error messagesname2- a name for the stream represented by the data written to this instance; used in error messages
-
ByteStreamComparator
@Deprecated public ByteStreamComparator(InputStream in)
Deprecated.
-
-
Method Detail
-
write
public void write(byte[] buffer, int off, int len) throws IOException- Overrides:
writein classOutputStream- Throws:
IOException
-
flush
public void flush() throws IOException- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-
write
public void write(int b) throws IOException- Specified by:
writein classOutputStream- Throws:
IOException
-
-