Method Summary |
|
public boolean | canWrite() Returns true if the buffer allows writes. |
public void | clearWrite() |
final public void | close() Close the stream, first flushing the write buffer. |
public void | flush() Flushes the buffer to the source. |
public void | flushBuffer() Flushes the buffer to the source. |
public void | flushToDisk() |
final public void | free() |
public Object | getAttribute(String name) Returns a named attribute. |
public Iterator | getAttributeNames() Lists all named attributes. |
public byte[] | getBuffer() Returns the write buffer. |
public int | getBufferOffset() Returns the write offset. |
public int | getBufferSize() Returns the write size. |
public boolean | getDisableClose() |
public String | getEncoding() Returns the mime-encoding used for writing. |
public String | getJavaEncoding() |
public String | getNewlineString() |
public Path | getPath() Returns the Path which opened this stream. |
public PrintWriter | getPrintWriter() Returns a printWriter writing to this stream. |
public int | getRemaining() Returns the bytes remaining in the buffer. |
public StreamImpl | getSource() Returns the underlying source for the stream. |
public String | getUserPath() Returns the user path which opened this stream. |
public void | init(StreamImpl source) Initializes the stream with a given source. |
final public boolean | isClosed() Returns true if the stream is closed. |
public boolean | lock(boolean shared, boolean block) |
final public void | log(String string) Logs a line to the stream. |
final public void | log(Throwable exn) |
public byte[] | nextBuffer(int offset) |
final public void | print(char[] buffer, int offset, int length) Prints the character buffer to the stream. |
final public void | print(char ch) Prints the character buffer to the stream. |
final public void | print(char[] buffer) Prints the character buffer to the stream. |
final public void | print(CharSegment segment) Prints the character buffer to the stream. |
final public void | print(String string) Prints a string. |
final public void | print(String string, int offset, int length) Prints a substring. |
final public void | print(boolean b) Prints a boolean. |
final public void | print(int i) Prints an integer. |
final public void | print(long i) Prints a long. |
final public void | print(float f) Prints a float. |
final public void | print(double d) |
final public void | print(Object o) |
final public void | println() |
final public void | println(char[] buf, int offset, int length) Prints a character buffer followed by a newline. |
final public void | println(String string) Prints a string buffer followed by a newline. |
final public void | println(boolean b) Prints a boolean followed by a newline. |
final public void | println(char ch) Prints a char followed by a newline. |
final public void | println(int i) Prints an integer followed by a newline. |
final public void | println(long l) Prints a long followed by a newline. |
final public void | println(float f) Prints a float followed by a newline. |
final public void | println(double d) Prints a double followed by a newline. |
final public void | println(Object o) Prints an object, converted to a string, followed by a newline. |
public void | pushFilter(StreamFilter filter) Pushes a filter on the top of the stream stack. |
public void | removeAttribute(String name) Removes a named attribute. |
public void | seekEnd(long offset) |
public void | seekStart(long offset) |
public void | setAttribute(String name, Object value) Sets a named attribute. |
public void | setBufferOffset(int offset) Sets the write offset. |
public void | setDisableClose(boolean disableClose) Disables close. |
public void | setDisableCloseSource(boolean disableClose) Disables close of the underlying source. |
public void | setEncoding(String encoding) Sets the character encoding for writing to this stream. |
public void | setFlushOnNewline(boolean flushOnNewline) Some streams, like log streams, should be flushed on every println
call. |
public void | setImplicitFlush(boolean implicitFlush) |
public void | setLocale(Locale locale) |
public void | setNewlineString(String newline) |
public void | setPath(Path path) Sets a path name associated with the stream. |
public void | setReuseBuffer(boolean reuse) |
public static void | setSystemNewline(String newline) For testing, sets the system newlines. |
public boolean | unlock() |
public void | write(int ch) Writes a byte. |
public void | write(byte[] buf, int offset, int length) |
public void | write(byte[] buf) Writes a byte array. |
public void | writeFile(Path path) Copies a file to the stream. |
public long | writeStream(InputStream source) Writes the contents of a JDK stream. |
public void | writeStream(Reader reader) Writes the contents of a JDK reader. |
public void | writeStream(InputStream source, int totalLength) Writes the contents of a JDK stream. |
public void | writeStream(StreamImpl source) Writes the contents of a JDK stream. |