public static class GalaxyAdaptor.Protocol extends Object implements Protocol
| Constructor and Description |
|---|
Protocol()
Creates a new Protocol
|
| Modifier and Type | Method and Description |
|---|---|
void |
append(String str)
Appends
str to the protocol. |
void |
appendHeading(String str)
Append a heading to the protocol
|
void |
appendThrowable(Throwable th)
Appends a
Throwable to the protocol. |
void |
appendVerbatim(String verbatim)
Appends some verbatim text (i.e., text that is displayed "as is" regardless of default formatting) to the protocol.
|
void |
appendWarning(String str)
Appends a warning to the protocol
|
void |
flush() |
ByteArrayOutputStream |
getOutputStream()
Returns the
ByteArrayOutputStream of this protocol |
PrintWriter |
getWriter()
Returns the
PrintWriter of this protocol |
String |
toString()
Returns the current version of the protocol as
String. |
public void append(String str)
str to the protocol.public PrintWriter getWriter()
PrintWriter of this protocolpublic ByteArrayOutputStream getOutputStream()
ByteArrayOutputStream of this protocolpublic void appendHeading(String str)
appendHeading in interface Protocolstr - the title of the headingpublic void appendWarning(String str)
appendWarning in interface Protocolstr - the warningpublic void appendThrowable(Throwable th)
ProtocolThrowable to the protocol. The message of the protocol is generally highlighted in some appropriate way.
Depending on the implementation, the stack trace of the Throwable may also be displayed.appendThrowable in interface Protocolth - the ThrowableThrowable.printStackTrace()public void appendVerbatim(String verbatim)
ProtocolappendVerbatim in interface Protocolverbatim - the verbatim textpublic void flush()
throws IOException
flush in interface FlushableIOException