|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.plumtree.openfoundation.io.XPWriter
public class XPWriter
Corresponds to java.io.Writer and System.IO.TextWriter, and is the type returned by XPSystem.Out.GetWriter() and XPSystem.Error.GetWriter().
| Field Summary | |
|---|---|
protected java.io.Writer |
writer
Not exposed via GetUnderlyingObject because that would break the polymorphism contract of the previously existing subclass XPBufferedWriter. |
| Constructor Summary | |
|---|---|
protected |
XPWriter()
Required to support subclasses, which must then assign to super.writer. |
|
XPWriter(java.io.PrintStream stdOutOrError)
Used by XPSystem to expose standard output or standard error output as an instance of a wrapper around Writer, matching .NET. |
|
XPWriter(java.io.Writer underlyingWriter)
Constructs a XPWriter object. |
| Method Summary | |
|---|---|
void |
Close()
Close the underlying writer. |
void |
Flush()
Clears all the buffers for this stream and cause any buffered data to be written to the underlying device. |
static XPWriter |
NullWriter()
Returns an instance of XPWriter not backed by a stream, which discards input. |
void |
Write(char[] buffer)
Writes an array of characters to the underlying writer. |
void |
Write(int b)
Writes a single character to the stream. |
void |
Write(java.lang.String outStr)
Writes a string. |
void |
Write(java.lang.String buffer,
int offset,
int count)
Writes a portion of a string. |
void |
WriteLine()
Writes the platform-defined line end character(s). |
void |
WriteLine(char[] buffer)
Writes an array of characters to the stream, followed by a newline. |
void |
WriteLine(int outChar)
Writes a character represented as an int,
followed by the platform-defined line end character(s). |
void |
WriteLine(java.lang.String outStr)
Writes a string followed by the platform-defined line end character(s). |
void |
WriteLine(java.lang.String buffer,
int offset,
int count)
Writes a portion of a string followed by the platform-specific newline. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.io.Writer writer
| Constructor Detail |
|---|
protected XPWriter()
public XPWriter(java.io.Writer underlyingWriter)
underlyingWriter - a Writer objectpublic XPWriter(java.io.PrintStream stdOutOrError)
stdOutOrError - a Printstream object| Method Detail |
|---|
public void Close()
XPIOExceptionpublic void Flush()
XPIOExceptionpublic void Write(int b)
b - A character
XPIOExceptionpublic void Write(char[] buffer)
buffer - Array of characters
XPIOException
public void Write(java.lang.String buffer,
int offset,
int count)
buffer - A stringoffset - Offset from which to start reading characterscount - Number of characters to write
XPIOExceptionpublic void Write(java.lang.String outStr)
outStr - A string
XPIOExceptionpublic void WriteLine()
XPIOExceptionpublic void WriteLine(java.lang.String outStr)
outStr - A string
XPIOExceptionpublic void WriteLine(int outChar)
int,
followed by the platform-defined line end character(s).
outChar - an int representing the character to output
XPIOExceptionpublic void WriteLine(char[] buffer)
buffer - Array of characters
XPIOException
public void WriteLine(java.lang.String buffer,
int offset,
int count)
buffer - A stringoffset - Offset from which to start reading characterscount - Number of characters to write
XPIOExceptionpublic static XPWriter NullWriter()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||