|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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 objectMethod Detail |
---|
public void Close()
XPIOException
public void Flush()
XPIOException
public void Write(int b)
b
- A character
XPIOException
public 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
XPIOException
public void Write(java.lang.String outStr)
outStr
- A string
XPIOException
public void WriteLine()
XPIOException
public void WriteLine(java.lang.String outStr)
outStr
- A string
XPIOException
public void WriteLine(int outChar)
int
,
followed by the platform-defined line end character(s).
outChar
- an int representing the character to output
XPIOException
public 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
XPIOException
public static XPWriter NullWriter()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |