Method Summary |
|
public int | available() Compatibility with InputStream. |
public boolean | canRead() Returns true if the stream allows reading. |
public void | clearRead() Clears the read buffer. |
final public void | close() Close the stream. |
public int | fillBuffer() Fills the buffer from the underlying stream. |
public boolean | fillWithTimeout(long timeout) Fills the buffer with a non-blocking read. |
public Object | getAttribute(String name) Returns a named attribute. |
public Iterator | getAttributeNames() Lists all named attributes. |
public int | getAvailable() Returns an estimate of the available bytes. |
public byte[] | getBuffer() |
public int | getBufferAvailable() Returns true if data in the buffer is available. |
public String | getEncoding() Returns the mime-encoding currently read. |
public int | getLength() |
public int | getOffset() |
public Path | getPath() Returns the Path which opened this stream. |
public long | getPosition() Returns the read position. |
public long | getReadTime() Returns the last read-time. |
public Reader | getReader() Returns a Reader reading to this stream. |
public WriteStream | getSibling() |
public StreamImpl | getSource() Returns the underlying source for the stream. |
public String | getURL() Returns the user path which opened this stream. |
public String | getUserPath() Returns the user path which opened this stream. |
public void | init(StreamImpl source, WriteStream sibling) Initializes the stream with a given source. |
public boolean | lock(boolean shared, boolean block) |
public void | pushFilter(StreamFilter filter) Pushes a filter on the top of the stream stack. |
final public int | read() Returns the next byte or -1 if at the end of file. |
final public int | read(byte[] buf, int offset, int length) Reads into a byte array. |
final public int | read(char[] buf, int offset, int length) Reads into a character buffer from the stream. |
public int | read(CharBuffer buf, int length) Reads characters from the stream, appending to the character buffer. |
public int | readAll(byte[] buf, int offset, int length) Reads into a byte array. |
public int | readAll(char[] buf, int offset, int length) Reads into a character buffer from the stream. |
public int | readAll(CharBuffer buf, int length) Reads characters from the stream, appending to the character buffer. |
final public int | readChar() Reads a character from the stream, returning -1 on end of file. |
public String | readLine() Reads a line, returning a string. |
final public boolean | readLine(CharBuffer cb) Reads a line into the character buffer. |
final public boolean | readLine(CharBuffer cb, boolean isChop) Reads a line into the character buffer. |
final public int | readLine(char[] buf, int length) Reads a line into the character buffer. |
final public int | readLine(char[] buf, int length, boolean isChop) Reads a line into the character buffer. |
public String | readLineNoChop() Reads a line, returning a string. |
public boolean | readNonBlock() Fills the buffer with a non-blocking read. |
final public String | readln() Reads a line from the stream, returning a string. |
final public boolean | readln(CharBuffer cb) Fills the buffer with the next line from the input stream. |
public void | removeAttribute(String name) Removes a named attribute. |
public void | setAttribute(String name, Object value) Sets a named attribute. |
public void | setDisableClose(boolean disableClose) Disables close. |
public void | setDisableCloseSource(boolean disableClose) Disables closing of the underlying source. |
public void | setEncoding(String encoding) Sets the current read encoding. |
public void | setOffset(int offset) |
public void | setPath(Path path) Sets a path name associated with the stream. |
public boolean | setPosition(long pos) Returns the sets current read position. |
public void | setReuseBuffer(boolean reuse) |
public void | setSibling(WriteStream sibling) |
public long | skip(long n) Skips the next n bytes.
Parameters: n - bytes to skip. |
public String | toString() Returns a printable representation of the read stream. |
public boolean | unlock() |
final public void | unread() Unreads the last byte. |
final public boolean | waitForRead() Waits for data to be available. |
public void | writeToStream(OutputStream os) Copies this stream to the output stream. |
public void | writeToStream(OutputStream os, int len) Writes len bytes to the output stream from this stream. |
public void | writeToWriter(Writer out) Copies this stream to the output stream. |