Spec-Zone.ru › OpenJDK 27

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 public class LogStream extends PrintStream
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

Modifier and Type Field Description
static final int BRIEF
Deprecated.
log level constant (brief logging).
static final int SILENT
Deprecated.
log level constant (no logging).
static final int VERBOSE
Deprecated.
log level constant (verbose logging).

Fields declared in class FilterOutputStream

out
Modifier and Type Field Description
protected OutputStream out
The underlying output stream to be filtered.

Method Summary

Modifier and Type Method Description
static PrintStream getDefaultStream()
Deprecated.
no replacement
OutputStream getOutputStream()
Deprecated.
no replacement
static LogStream log(String name)
Deprecated.
no replacement
static int parseLevel(String s)
Deprecated.
no replacement
static void setDefaultStream(PrintStream newDefault)
Deprecated.
no replacement
void setOutputStream(OutputStream out)
Deprecated.
no replacement
String toString()
Deprecated.
no replacement
void write(byte[] b, int off, int len)
Deprecated.
no replacement
void write(int b)
Deprecated.
no replacement

Methods 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, writeBytes
Modifier and Type Method Description
PrintStream append(char c)
Appends the specified character to this output stream.
PrintStream append(CharSequence csq)
Appends the specified character sequence to this output stream.
PrintStream append(CharSequence csq, int start, int end)
Appends a subsequence of the specified character sequence to this output stream.
Charset charset()
Returns the charset used in this PrintStream instance.
boolean checkError()
Flushes the stream if it's not closed and checks its error state.
protected void clearError()
Clears the error state of this stream.
void close()
Closes the stream.
void flush()
Flushes the stream.
PrintStream format(String format, Object... args)
Writes a formatted string to this output stream using the specified format string and arguments.
PrintStream format(Locale l, String format, Object... args)
Writes a formatted string to this output stream using the specified format string and arguments.
void print(boolean b)
Prints a boolean value.
void print(char c)
Prints a character.
void print(char[] s)
Prints an array of characters.
void print(double d)
Prints a double-precision floating-point number.
void print(float f)
Prints a floating-point number.
void print(int i)
Prints an integer.
void print(long l)
Prints a long integer.
void print(Object obj)
Prints an object.
void print(String s)
Prints a string.
PrintStream printf(String format, Object... args)
A convenience method to write a formatted string to this output stream using the specified format string and arguments.
PrintStream printf(Locale l, String format, Object... args)
A convenience method to write a formatted string to this output stream using the specified format string and arguments.
void println()
Terminates the current line by writing the line separator string.
void println(boolean x)
Prints a boolean and then terminates the line.
void println(char x)
Prints a character and then terminates the line.
void println(char[] x)
Prints an array of characters and then terminates the line.
void println(double x)
Prints a double and then terminates the line.
void println(float x)
Prints a float and then terminates the line.
void println(int x)
Prints an integer and then terminates the line.
void println(long x)
Prints a long and then terminates the line.
void println(Object x)
Prints an Object and then terminates the line.
void println(String x)
Prints a String and then terminates the line.
protected void setError()
Sets the error state of the stream to true.
void write(byte[] buf)
Writes all bytes from the specified byte array to this stream.
void writeBytes(byte[] buf)
Writes all bytes from the specified byte array to this stream.

Methods declared in class OutputStream

nullOutputStream
Modifier and Type Method Description
static OutputStream nullOutputStream()
Returns a new OutputStream which discards all bytes.

Methods declared in class Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Modifier and Type Method Description
protected Object clone()
Creates and returns a copy of this object.
boolean equals(Object obj)
Indicates whether some other object is "equal to" this one.
protected void finalize()
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 this Object.
int hashCode()
Returns a hash code value for this object.
final void notify()
Wakes up a single thread that is waiting on this object's monitor.
final void notifyAll()
Wakes up all threads that are waiting on this object's monitor.
final void wait()
Causes the current thread to wait until it is awakened, typically by being notified or interrupted.
final void wait(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 void wait(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 SILENT
Deprecated.
log level constant (no logging).
See Also:
  • Constant Field Values

BRIEF

public static final int BRIEF
Deprecated.
log level constant (brief logging).
See Also:
  • Constant Field Values

VERBOSE

public static final int VERBOSE
Deprecated.
log level constant (verbose logging).
See Also:
  • Constant Field Values

Method Details

log

@Deprecated public static LogStream log(String name)
Deprecated.
no replacement
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
Since:
1.1

getDefaultStream

@Deprecated public static PrintStream getDefaultStream()
Deprecated.
no replacement
Return the current default stream for new logs.
Returns:
default log stream
Since:
1.1
See Also:
  • setDefaultStream(PrintStream)

setDefaultStream

@Deprecated public static void setDefaultStream(PrintStream newDefault)
Deprecated.
no replacement
Set the default stream for new logs.
Parameters:
newDefault - new default log stream
Since:
1.1
See Also:
  • getDefaultStream()

getOutputStream

@Deprecated public OutputStream getOutputStream()
Deprecated.
no replacement
Return the current stream to which output from this log is sent.
Returns:
output stream for this log
Since:
1.1
See Also:
  • setOutputStream(OutputStream)

setOutputStream

@Deprecated public void setOutputStream(OutputStream out)
Deprecated.
no replacement
Set the stream to which output from this log is sent.
Parameters:
out - new output stream for this log
Since:
1.1
See Also:
  • getOutputStream()

write

@Deprecated public void write(int b)
Deprecated.
no replacement
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 - The byte to be written
Since:
1.1
See Also:
  • PrintStream.print(char)
  • PrintStream.println(char)

write

@Deprecated public void write(byte[] b, int off, int len)
Deprecated.
no replacement
Write a subarray of bytes. Pass each through write byte method.
Overrides:
write in class PrintStream
Parameters:
b - A byte array
off - Offset from which to start taking bytes
len - Number of bytes to write
Since:
1.1
See Also:
  • FilterOutputStream.write(int)

toString

@Deprecated public String toString()
Deprecated.
no replacement
Return log name as string representation.
Overrides:
toString in class Object
Returns:
log name
Since:
1.1

parseLevel

@Deprecated public static int parseLevel(String s)
Deprecated.
no replacement
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
Since:
1.1

Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples. Other versions.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2026, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.

© 1993, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API