Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.caucho.vfs
Class LogStream

    java.lang.Object
      |
      +--com.caucho.vfs.StreamImpl
            |
            +--com.caucho.vfs.LogStream

All Implemented Interfaces:
  ChangeListener, java.util.EventListener

public class LogStream
extends StreamImpl
implements ChangeListener

The primary debugging stream in Resin.

Fields inherited from class com.caucho.vfs.StreamImpl
`nullPath, path`

Method Summary
`boolean` | `canWrite()` Returns true if this is a writable stream.
`void` | `close()` Closes the stream.
`void` | `destroy()`
`void` | `flush()` Flushes the write output.
`void` | `handleChange(java.lang.Object object)` When the resin.conf changes, update the logging.
`static WriteStream` | `open(java.lang.String logId)` Create a new stream based on the logId.
`static WriteStream` | `openQuiet(java.lang.String logId)` Create a new stream based on the logId.
`void` | `setDoLogId(boolean logId)`
`void` | `write(byte[] buf, int offset, int length, boolean isEnd)` Writes the buffered chunk to the underlying 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`

Method Detail

### setDoLogId

    public void setDoLogId(boolean logId)

### handleChange

    public void handleChange(java.lang.Object object)

  When the resin.conf changes, update the logging.
  Specified by:
    `handleChange` in interface `ChangeListener`

### open

    public static WriteStream open(java.lang.String logId)

  Create a new stream based on the logId. The LogStream will only write to something if it's configured in the resin.conf.
  Parameters:
    `logId` - the name of the debug stream to open

### openQuiet

    public static WriteStream openQuiet(java.lang.String logId)

  Create a new stream based on the logId. The LogStream will only write to something if it's configured in the resin.conf.
  Parameters:
    `logId` - the name of the debug stream to open

### canWrite

    public final boolean canWrite()

  Description copied from class: `StreamImpl`
  Returns true if this is a writable stream.
  Overrides:
    `canWrite` in class `StreamImpl`

### write

    public void write(byte[] buf,
                      int offset,
                      int length,
                      boolean isEnd)
               throws java.io.IOException

  Writes the buffered chunk to the underlying stream.
  Overrides:
    `write` in class `StreamImpl`
  Parameters:
    `buf` - byte buffer to write
    `offset` - offset into the buffer to start writing
    `length` - length of the buffer to write
    `isEnd` - true when the stream is closing.

### flush

    public void flush()

  Description copied from class: `StreamImpl`
  Flushes the write output.
  Overrides:
    `flush` in class `StreamImpl`

### close

    public void close()

  Description copied from class: `StreamImpl`
  Closes the stream.
  Overrides:
    `close` in class `StreamImpl`

### destroy

    public void destroy()

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD