This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


java.rmi.server
class LogStream

java.lang.Object extended by java.io.OutputStream extended by java.io.FilterOutputStream extended by java.io.PrintStream extended by java.rmi.server.LogStream
All Implemented Interfaces:
Closeable, Flushable, Appendable

public class LogStream
extends PrintStream

LogStream provides a mechanism for logging errors that are of possible interest to those monitoring a system.


Field Summary
static int BRIEF
          log level constant (brief logging).
static int SILENT
          log level constant (no logging).
static int VERBOSE
          log level constant (verbose logging).
 
Fields inherited from class java.io.FilterOutputStream
out
 
Method Summary
static PrintStream

          Return the current default stream for new logs.
 OutputStream

          Return the current stream to which output from this log is sent.
static LogStream
log(String name)

          Return the LogStream identified by the given name.
static int

          Convert a string name of a logging level to its internal integer representation.
static void

          Set the default stream for new logs.
 void

          Set the stream to which output from this log is sent.
 String

          Return log name as string representation.
 void
write(byte[] b, int off, int len)

          Write a subarray of bytes.
 void
write(int b)

          Write a byte of data to the stream.
 
Methods inherited from class java.io.PrintStream
append, append, append, checkError, clearError, close, flush, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, println, setError, write, write
 
Methods inherited from class java.io.FilterOutputStream
close, flush, write, write, write
 
Methods inherited from class java.io.OutputStream
close, flush, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BRIEF

public static final int BRIEF
log level constant (brief logging).

SILENT

public static final int SILENT
log level constant (no logging).

VERBOSE

public static final int VERBOSE
log level constant (verbose logging).
Method Detail

getDefaultStream

public static synchronized PrintStream getDefaultStream()
Return the current default stream for new logs.

Returns:
default log stream

getOutputStream

public synchronized OutputStream getOutputStream()
Return the current stream to which output from this log is sent.

Returns:
output stream for this log

log

public static LogStream log(String name)
Return the LogStream identified by the given name. If a log corresponding to "name" does not exist, a log using the default stream is created.

Parameters:
name - name identifying the desired LogStream
Returns:
log associated with given name

parseLevel

public static int parseLevel(String s)
Convert a string name of a logging level to its internal integer representation.

Parameters:
s - name of logging level (e.g., 'SILENT', 'BRIEF', 'VERBOSE')
Returns:
corresponding integer log level

setDefaultStream

public static synchronized void setDefaultStream(PrintStream newDefault)
Set the default stream for new logs.

Parameters:
newDefault - new default log stream

setOutputStream

public synchronized void setOutputStream(OutputStream out)
Set the stream to which output from this log is sent.

Parameters:
out - new output stream for this log

toString

public String toString()
Return log name as string representation.

Overrides:
toString in class Object
Returns:
log name

write

public void write(byte[] b,
                  int off,
                  int len)
Write a subarray of bytes. Pass each through write byte method.

Overrides:
write in class PrintStream
Parameters:
b
off
len

write

public void write(int b)
Write a byte of data to the stream. If it is not a newline, then the byte is appended to the internal buffer. If it is a newline, then the currently buffered line is sent to the log's output stream, prefixed with the appropriate logging information.

Overrides:
write in class PrintStream
Parameters:
b


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.