|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.caucho.vfs.StreamImpl | +--com.caucho.vfs.ClassLoaderStream
A stream that varies depending on the context class loader.
Fields inherited from class com.caucho.vfs.StreamImpl |
nullPath, path |
Constructor Summary | |
ClassLoaderStream(java.lang.String contextVariable,
java.io.OutputStream defaultStream)
Create the context stream. |
Method Summary | |
boolean |
canWrite()
True if the stream can write |
void |
close()
Flush data to the stream. |
void |
flush()
Flush data to the stream. |
java.io.OutputStream |
getDefaultStream()
Returns the context stream's variable. |
static ClassLoaderStream |
getStderr()
|
static ClassLoaderStream |
getStdout()
|
java.io.OutputStream |
getStream()
Gets the current write stream |
java.lang.String |
getVariable()
Returns the context stream's variable. |
void |
setDefaultStream(java.io.OutputStream defaultStream)
Returns the context stream's variable. |
static void |
setStderr(java.io.OutputStream os)
Sets path as the backing stream for System.err |
static void |
setStdout(java.io.OutputStream os)
Sets the backing stream for System.out |
void |
setStream(java.io.OutputStream os)
Sets the current write stream. |
void |
write(byte[] buf,
int offset,
int length,
boolean isEnd)
Write data to the stream. |
Methods inherited from class com.caucho.vfs.StreamImpl |
canRead, clearWrite, getAttribute, getAttributeNames, getAvailable, getFlushOnNewline, getNewline, getPath, getReadPosition, hasSkip, read, removeAttribute, setAttribute, setPath, skip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ClassLoaderStream(java.lang.String contextVariable, java.io.OutputStream defaultStream)
contextVariable
- the variable for the underlying streamMethod Detail |
public static void setStdout(java.io.OutputStream os)
public static ClassLoaderStream getStdout()
public static void setStderr(java.io.OutputStream os)
public static ClassLoaderStream getStderr()
public java.lang.String getVariable()
public java.io.OutputStream getDefaultStream()
public void setDefaultStream(java.io.OutputStream defaultStream)
public boolean canWrite()
canWrite
in class StreamImpl
public void write(byte[] buf, int offset, int length, boolean isEnd) throws java.io.IOException
write
in class StreamImpl
com.caucho.vfs.StreamImpl
buffer
- the byte array to write.offset
- the offset into the byte array.length
- the number of bytes to write.isEnd
- true when the write is flushing a close.public void flush() throws java.io.IOException
flush
in class StreamImpl
public void close() throws java.io.IOException
close
in class StreamImpl
public void setStream(java.io.OutputStream os)
public java.io.OutputStream getStream()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |