APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.org.apache.xml.internal.security.utils

public Class UnsyncByteArrayOutputStream

extends OutputStream
Class Inheritance
Imports
java.io.IOException, .OutputStream

A simple Unsynced ByteArrayOutputStream

Field Summary

Modifier and TypeField and Description
private byte[]
private static final int
private int
private int
private static final int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
expandSize(int newPos)

public void
public byte[]
public void
write(byte[] arg0)

Overrides java.io.OutputStream.write.

Writes b.length bytes from the specified byte array to this output stream.

public void
write(byte[] arg0, int arg1, int arg2)

Overrides java.io.OutputStream.write.

Writes len bytes from the specified byte array starting at offset off to this output stream.

public void
write(int arg0)

Implements abstract java.io.OutputStream.write.

Writes the specified byte to this output stream.

public void
writeTo(OutputStream
an OutputStream on which to write the contents of this stream.
out
)

Takes the contents of this stream and writes it to the output stream out.

Inherited from java.io.OutputStream:
closeflushnullOutputStream

Field Detail

bufback to summary
private byte[] buf
INITIAL_SIZEback to summary
private static final int INITIAL_SIZE
posback to summary
private int pos
sizeback to summary
private int size
VM_ARRAY_INDEX_MAX_VALUEback to summary
private static final int VM_ARRAY_INDEX_MAX_VALUE

Constructor Detail

UnsyncByteArrayOutputStreamback to summary
public UnsyncByteArrayOutputStream()

Method Detail

expandSizeback to summary
private void expandSize(int newPos)
resetback to summary
public void reset()
toByteArrayback to summary
public byte[] toByteArray()
writeback to summary
public void write(byte[] arg0)

Overrides java.io.OutputStream.write.

Doc from java.io.OutputStream.write.

Writes b.length bytes from the specified byte array to this output stream. The general contract for write(b) is that it should have exactly the same effect as the call write(b, 0, b.length).

Annotations
@Override
writeback to summary
public void write(byte[] arg0, int arg1, int arg2)

Overrides java.io.OutputStream.write.

Doc from java.io.OutputStream.write.

Writes len bytes from the specified byte array starting at offset off to this output stream. The general contract for write(b, off, len) is that some of the bytes in the array b are written to the output stream in order; element b[off] is the first byte written and b[off+len-1] is the last byte written by this operation.

If b is null, a NullPointerException is thrown.

If off is negative, or len is negative, or off+len is greater than the length of the array b, then an IndexOutOfBoundsException is thrown.

Annotations
@Override
writeback to summary
public void write(int arg0)

Implements abstract java.io.OutputStream.write.

Doc from java.io.OutputStream.write.

Writes the specified byte to this output stream. The general contract for write is that one byte is written to the output stream. The byte to be written is the eight low-order bits of the argument b. The 24 high-order bits of b are ignored.

Annotations
@Override
writeToback to summary
public void writeTo(OutputStream out) throws IOException

Takes the contents of this stream and writes it to the output stream out.

Parameters
out:OutputStream

an OutputStream on which to write the contents of this stream.

Exceptions
IOException:
if an error occurs while writing to out.