|
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.InputStream | +--com.sssw.fw.util.EboByteBufferInputStream
EboByteBufferInputStream This class is similar to the standard ByteArrayInputStream. It differs in that the actual underlying storage mechanism is detachable from the stream object. This allows for efficient transfer of data from an input stream to an output stream without having to copy the data into another buffer (as with the ByteArray streams).
Constructor Summary | |
EboByteBufferInputStream()
Creates a new EboByteBufferInputStream |
|
EboByteBufferInputStream(byte[] bytes)
Creates a new EboByteBufferInputStream from the specified byte array. |
|
EboByteBufferInputStream(EboByteBuffer buffer)
Creates a new EboByteBufferInputStream using the specified ByteBuffer The cursor for the storage agent is re-set to the start of the buffer. |
|
EboByteBufferInputStream(EboByteBufferOutputStream out)
Creates a new EboByteBufferInputStream using the specified EboByteBufferOutputStream''s underlying storage agent. |
|
EboByteBufferInputStream(String str)
Deprecated. |
|
EboByteBufferInputStream(String str,
String enc)
Creates a new EboByteBufferInputStream from the specified String. |
Method Summary | |
int |
available()
Get the size of the available buffer space. |
EboByteBuffer |
getBuffer()
Return the underlying ByteBuffer Storage agent. |
int |
read()
Read the next byte from the buffer. |
int |
read(byte[] outbuf)
Read bytes until the specified output array until it is full. |
int |
read(byte[] outbuf,
int offset,
int len)
Read bytes until the specified output array until it is full. |
EboByteBuffer |
setBuffer(EboByteBuffer newBuffer)
Set this Stream objects underlying storage to the new EboByteBuffer storage agent. |
int |
size()
Get the current size of the buffer that is in use. |
long |
skip(long byteCnt)
Move the cursor position forward by specified number of bytes. |
Methods inherited from class java.io.InputStream |
close,
mark,
markSupported,
reset |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public EboByteBufferInputStream()
public EboByteBufferInputStream(EboByteBuffer buffer)
buffer
- the underlying storage for this streampublic EboByteBufferInputStream(String str)
s
- the String valuepublic EboByteBufferInputStream(String str, String enc) throws UnsupportedEncodingException
str
- the String valueenc
- The character encodingpublic EboByteBufferInputStream(byte[] bytes)
bytes
- the byte[] valuepublic EboByteBufferInputStream(EboByteBufferOutputStream out)
out
- detach the ByteBuffer from this EboByteBufferOutputStream
and use it as our own storage agent.Method Detail |
public int read()
public int read(byte[] outbuf)
outbuf
- output byte arraypublic int read(byte[] outbuf, int offset, int len)
outbuf
- output byte arrayoffset
- starting index to use in the output arraylen
- the number of bytes to readpublic long skip(long byteCnt)
byteCnt
- requested number of bytes to skippublic int available()
public int size()
public 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 |