|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object SK.gnome.dwarf.mail.mime.StreamSource
Provides memory-based shared input stream source.
Constructor Summary | |
StreamSource(java.io.InputStream in)
Creates a new StreamSource from the given stream. |
Method Summary | |
int |
getSize()
Returns the size of the base stream. |
java.io.InputStream |
newStream(int offset,
int length)
Creates a new stream from the underlying source stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StreamSource(java.io.InputStream in) throws java.io.IOException
This constructor preloads the entire source stream content into a byte buffer. All subsequent input streams are created from this buffer only.
in
- the source stream
java.io.IOException
- if an error occursMethod Detail |
public java.io.InputStream newStream(int offset, int length) throws java.io.IOException
SharedInputStreamSource
The new stream begins at the offset position of the original source stream and its total length is limited to length octets.
The returned input stream may be buffered for a better efficiency.
newStream
in interface SharedInputStreamSource
offset
- the offsetlength
- the length
java.io.IOException
- if an error occurspublic int getSize()
SharedInputStreamSource
getSize
in interface SharedInputStreamSource
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |