Class LogStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
java.io.PrintStream
java.rmi.server.LogStream
- All Implemented Interfaces:
Closeable, Flushable, Appendable, AutoCloseable
Deprecated.
no replacement
LogStream provides a mechanism for logging errors that are
of possible interest to those monitoring a system.- Since:
- 1.1
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDeprecated.log level constant (brief logging).static final intDeprecated.log level constant (no logging).static final intDeprecated.log level constant (verbose logging).Fields inherited from class FilterOutputStream
outModifier and TypeFieldDescriptionprotected OutputStreamThe underlying output stream to be filtered. -
Method Summary
Modifier and TypeMethodDescriptionstatic PrintStreamDeprecated.no replacementDeprecated.no replacementstatic LogStreamDeprecated.no replacementstatic intparseLevel(String s) Deprecated.no replacementstatic voidsetDefaultStream(PrintStream newDefault) Deprecated.no replacementvoidDeprecated.no replacementtoString()Deprecated.no replacementvoidwrite(byte[] b, int off, int len) Deprecated.no replacementvoidwrite(int b) Deprecated.no replacementMethods inherited from class PrintStream
append, append, append, charset, 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, writeBytesModifier and TypeMethodDescriptionappend(char c) Appends the specified character to this output stream.append(CharSequence csq) Appends the specified character sequence to this output stream.append(CharSequence csq, int start, int end) Appends a subsequence of the specified character sequence to this output stream.charset()Returns the charset used in thisPrintStreaminstance.booleanFlushes the stream if it's not closed and checks its error state.protected voidClears the error state of this stream.voidclose()Closes the stream.voidflush()Flushes the stream.Writes a formatted string to this output stream using the specified format string and arguments.Writes a formatted string to this output stream using the specified format string and arguments.voidprint(boolean b) Prints a boolean value.voidprint(char c) Prints a character.voidprint(char[] s) Prints an array of characters.voidprint(double d) Prints a double-precision floating-point number.voidprint(float f) Prints a floating-point number.voidprint(int i) Prints an integer.voidprint(long l) Prints a long integer.voidPrints an object.voidPrints a string.A convenience method to write a formatted string to this output stream using the specified format string and arguments.A convenience method to write a formatted string to this output stream using the specified format string and arguments.voidprintln()Terminates the current line by writing the line separator string.voidprintln(boolean x) Prints a boolean and then terminates the line.voidprintln(char x) Prints a character and then terminates the line.voidprintln(char[] x) Prints an array of characters and then terminates the line.voidprintln(double x) Prints a double and then terminates the line.voidprintln(float x) Prints a float and then terminates the line.voidprintln(int x) Prints an integer and then terminates the line.voidprintln(long x) Prints a long and then terminates the line.voidPrints an Object and then terminates the line.voidPrints a String and then terminates the line.protected voidsetError()Sets the error state of the stream totrue.voidwrite(byte[] buf) Writes all bytes from the specified byte array to this stream.voidwriteBytes(byte[] buf) Writes all bytes from the specified byte array to this stream.Methods inherited from class OutputStream
nullOutputStreamModifier and TypeMethodDescriptionstatic OutputStreamReturns a newOutputStreamwhich discards all bytes.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()Creates and returns a copy of this object.booleanIndicates whether some other object is "equal to" this one.protected voidfinalize()Deprecated, for removal: This API element is subject to removal in a future version.Finalization is deprecated and subject to removal in a future release.final Class<?> getClass()Returns the runtime class of thisObject.inthashCode()Returns a hash code value for this object.final voidnotify()Wakes up a single thread that is waiting on this object's monitor.final voidWakes up all threads that are waiting on this object's monitor.final voidwait()Causes the current thread to wait until it is awakened, typically by being notified or interrupted.final voidwait(long timeoutMillis) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.final voidwait(long timeoutMillis, int nanos) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
-
Field Details
-
SILENT
public static final int SILENTDeprecated.log level constant (no logging).- See Also:
-
BRIEF
public static final int BRIEFDeprecated.log level constant (brief logging).- See Also:
-
VERBOSE
public static final int VERBOSEDeprecated.log level constant (verbose logging).- See Also:
-
-
Method Details
-
log
Deprecated.no replacementReturn 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
- Since:
- 1.1
-
getDefaultStream
Deprecated.no replacementReturn the current default stream for new logs.- Returns:
- default log stream
- Since:
- 1.1
- See Also:
-
setDefaultStream
Deprecated.no replacementSet the default stream for new logs.- Parameters:
newDefault- new default log stream- Since:
- 1.1
- See Also:
-
getOutputStream
Deprecated.no replacementReturn the current stream to which output from this log is sent.- Returns:
- output stream for this log
- Since:
- 1.1
- See Also:
-
setOutputStream
Deprecated.no replacementSet the stream to which output from this log is sent.- Parameters:
out- new output stream for this log- Since:
- 1.1
- See Also:
-
write
Deprecated.no replacementWrite 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:
writein classPrintStream- Parameters:
b- The byte to be written- Since:
- 1.1
- See Also:
-
write
Deprecated.no replacementWrite a subarray of bytes. Pass each through write byte method.- Overrides:
writein classPrintStream- Parameters:
b- A byte arrayoff- Offset from which to start taking byteslen- Number of bytes to write- Since:
- 1.1
- See Also:
-
toString
Deprecated.no replacementReturn log name as string representation. -
parseLevel
Deprecated.no replacementConvert 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
- Since:
- 1.1
-