Package org.apache.xml.security.utils
Class UnsyncByteArrayOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- org.apache.xml.security.utils.UnsyncByteArrayOutputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.io.Flushable
,java.lang.AutoCloseable
public class UnsyncByteArrayOutputStream extends java.io.OutputStream
A simple Unsynced ByteArrayOutputStream
-
-
Constructor Summary
Constructors Constructor Description UnsyncByteArrayOutputStream()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
reset()
byte[]
toByteArray()
void
write(byte[] arg0)
void
write(byte[] arg0, int arg1, int arg2)
void
write(int arg0)
void
writeTo(java.io.OutputStream out)
Takes the contents of this stream and writes it to the output streamout
.
-
-
-
Method Detail
-
write
public void write(byte[] arg0)
- Overrides:
write
in classjava.io.OutputStream
-
write
public void write(byte[] arg0, int arg1, int arg2)
- Overrides:
write
in classjava.io.OutputStream
-
write
public void write(int arg0)
- Specified by:
write
in classjava.io.OutputStream
-
toByteArray
public byte[] toByteArray()
-
reset
public void reset()
-
writeTo
public void writeTo(java.io.OutputStream out) throws java.io.IOException
Takes the contents of this stream and writes it to the output streamout
.- Parameters:
out
- an OutputStream on which to write the contents of this stream.- Throws:
java.io.IOException
- if an error occurs while writing toout
.
-
-