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 declared in 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 declared in 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 declared in class OutputStream
nullOutputStreamModifier and TypeMethodDescriptionstatic OutputStreamReturns a newOutputStreamwhich discards all bytes.Methods declared in class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()Answers a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.booleanCompares the argument to the receiver, and answers true if they represent the same object using a class specific comparison.protected voidfinalize()Deprecated, for removal: This API element is subject to removal in a future version.May cause performance issues, deadlocks and hangs.getClass()Answers the unique instance of java.lang.Class which represents the class of the receiver.inthashCode()Answers an integer hash code for the receiver.final voidnotify()Causes one thread which iswaiting on the receiver to be made ready to run.final voidCauses all threads which arewaiting on the receiver to be made ready to run.final voidwait()Causes the thread which sent this message to be made not ready to run pending some change in the receiver (as indicated bynotifyornotifyAll).final voidwait(long time) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.final voidwait(long time, int frac) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.
-
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
-