|
Oracle Security Developer Tools Crypto Java API Reference 10g (10.1.4.0.1) B28171-01 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
java.io.OutputStream
oracle.security.crypto.util.FixedByteArrayOutputStream
A fixed-size, unsynchronized ByteArrayOutptStream, that provides access to the internal buffer for efficiency.
| Field Summary | |
protected byte[] |
bufThe buffer to contains the bytes written to this stream. |
protected int |
countThe number of bytes written to this stream. |
| Constructor Summary | |
FixedByteArrayOutputStream(byte[] buf)Creates a FixedByteArrayOutputStream using the given buffer. |
|
FixedByteArrayOutputStream(int size)Creates a FixedByteArrayOutputStream with a newly allocated buffer of the given size. |
|
| Method Summary | |
int |
bufSize()Returns the capacity of the internal buffer. |
void |
close()Closes this output stream. |
byte[] |
getBytes()Returns a reference to the full internal buffer. |
void |
reset()Resets the count of bytes written to this stream to zero. |
int |
size()Returns the number of bytes written to this stream. |
byte[] |
toByteArray()Returns a newly allocated byte array of size equal to the number of valid bytes written to this stream. |
void |
write(byte[] b) |
void |
write(byte[] b, int off, int len) |
void |
write(int b) |
| Methods inherited from class java.io.OutputStream |
flush |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected byte[] buf
protected int count
| Constructor Detail |
public FixedByteArrayOutputStream(int size)
FixedByteArrayOutputStream with a newly allocated buffer of the given size.public FixedByteArrayOutputStream(byte[] buf)
FixedByteArrayOutputStream using the given buffer. The initial contents of buf, if any, will be ignored.| Method Detail |
public void close()
throws java.io.IOException
write methods after close will cause an exception to be thrown.java.io.IOExceptionpublic void reset()
public int size()
public int bufSize()
public byte[] toByteArray()
public byte[] getBytes()
IllegalStateException is thrown.
public void write(byte[] b)
throws java.io.IOException
java.io.IOException
public void write(byte[] b,
int off,
int len)
throws java.io.IOException
java.io.IOException
public void write(int b)
throws java.io.IOException
java.io.IOException
|
Oracle Security Developer Tools Crypto Java API Reference 10g (10.1.4.0.1) B28171-01 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||