|
Novell exteNd Director 5.2 API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.io.OutputStream | +--com.sssw.fw.util.EboByteBufferOutputStream
EboByteBufferOutputStream This class is similar to the standard ByteArrayOutputStream. It differs in that the actual underlying storage mechanism is detachable from the stream object. This allows for efficient transfer of data from an output stream to an input stream without having to copy the data into another buffer (as with the ByteArray streams).
Constructor Summary | |
EboByteBufferOutputStream()
Creates a new EboByteBufferOutputStream |
|
EboByteBufferOutputStream(EboByteBuffer buffer)
Creates a new EboByteBufferOutputStream using the specified EboByteBuffer |
|
EboByteBufferOutputStream(EboByteBufferInputStream in)
Creates a new EboByteBufferOutputStream using the specified ByteBufferInputStream''s underlying storage agent. |
|
EboByteBufferOutputStream(InputStream in)
Creates a new EboByteBufferOutputStream using the specified InputStream as data values. |
Method Summary | |
EboByteBuffer |
getBuffer()
Return the underlying EboByteBuffer Storage agent. |
void |
reset()
Re-set the stream to the empty state. |
EboByteBuffer |
setBuffer(EboByteBuffer newBuffer)
Set this Stream objects underlying storage to the new ByteBuffer storage agent. |
int |
size()
Get the current size of the stream. |
byte[] |
toByteArray()
Get a copy of the in use portion of the buffer as a byte array |
String |
toString()
Converts stream data to a String |
String |
toString(String urlEncoding)
Converts stream data to a String, translating bytes into characters according to the specified character encoding. |
void |
write(byte[] bytes)
Write the specified byte array to the buffer. |
void |
write(byte[] bytes,
int offset,
int len)
Write the specified number of bytes to the buffer. |
void |
write(int b)
Write the specified byte to the byte buffer stream. |
void |
writeTo(OutputStream out)
Write the contents of this stream to the specified stream. |
Methods inherited from class java.io.OutputStream |
close,
flush |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public EboByteBufferOutputStream()
public EboByteBufferOutputStream(EboByteBuffer buffer)
buffer
- the underlying storage for this streampublic EboByteBufferOutputStream(EboByteBufferInputStream in)
in
- detach the ByteBuffer from the EboByteBufferInputStream
and use it as our own storage agent.public EboByteBufferOutputStream(InputStream in) throws IOException
in
- Data Input StreamMethod Detail |
public void write(int b)
b
- the byte to write to bufferpublic void write(byte[] bytes)
bytes
- byte array containing bytes to be written to bufferpublic void write(byte[] bytes, int offset, int len)
bytes
- byte array containing bytes to be written to bufferoffset
- starting offset in the input byte array to uselen
- number of bytes to be writtenpublic void writeTo(OutputStream out) throws IOException
out
- OutputStream to write out contentpublic byte[] toByteArray()
public void reset()
public int size()
public String toString()
public String toString(String urlEncoding) throws UnsupportedEncodingException
urlEncoding
- String which specifies character encodingpublic EboByteBuffer getBuffer()
public EboByteBuffer setBuffer(EboByteBuffer newBuffer)
|
Novell exteNd Director 5.2 API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |