***  This class provides Binary Compatibility only, not Source Compatibility  ***

com.sas.services.logging.util
Class LoggerStream

com.sas.services.logging.util.LoggerStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

Deprecated. As of 9.3, replace with direct use of log4j.

@Deprecated
public class LoggerStream

LoggerStream - used to create an output stream connected to a Logging Service LoggerInterface. Typically a LoggerInterface object is obtained from the LoggingServiceInterface, and that LoggerInterface object is passed to the constructor for this class. The LoggerStream object is then used as an OutputStream would normally be used. Information sent to this LoggerStream will appear as Logging Service messages originating from the specified LoggerInterface object.

Since:
1.0
See Also:
Logging Service Documentation

Field Summary
static int DEFAULT_BUFFER_SIZE
          Deprecated. Default size, in bytes, of data flushed to Output Stream target.
 
Constructor Summary
LoggerStream(LoggerInterface log, java.lang.String context, int priority)
          Deprecated. Constructor.
 
Method Summary
 void close()
          Deprecated. Close the LoggerStream.
 void flush()
          Deprecated. Flush data contained in the LoggerStream.
 int getBufferSize()
          Deprecated. Get the size of the LoggerStream buffer.
 void setBufferSize(int bufferSize)
          Deprecated. Set the size of the LoggerStream buffer.
 void write(byte[] b)
          Deprecated. Write a byte array to the LoggerStream.
 void write(byte[] b, int offset, int length)
          Deprecated. Write a byte array to the LoggerStream.
 void write(int i)
          Deprecated. Write to the LoggerStream.
 

Field Detail

DEFAULT_BUFFER_SIZE

public static final int DEFAULT_BUFFER_SIZE
Deprecated. 
Default size, in bytes, of data flushed to Output Stream target.

See Also:
Constant Field Values
Constructor Detail

LoggerStream

public LoggerStream(LoggerInterface log,
                    java.lang.String context,
                    int priority)
Deprecated. 
Constructor.

Parameters:
log - a LoggerInterface object that messages will be logged on.
context - logging context for messages logged.
priority - level that messages will be reported at.
Method Detail

close

public void close()
Deprecated. 
Close the LoggerStream.

Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.OutputStream

flush

public void flush()
Deprecated. 
Flush data contained in the LoggerStream.

Specified by:
flush in interface java.io.Flushable
Overrides:
flush in class java.io.OutputStream

write

public void write(byte[] b)
Deprecated. 
Write a byte array to the LoggerStream.

Overrides:
write in class java.io.OutputStream
Parameters:
b - byte array to write.

write

public void write(byte[] b,
                  int offset,
                  int length)
Deprecated. 
Write a byte array to the LoggerStream.

Overrides:
write in class java.io.OutputStream
Parameters:
b - byte array to write.
offset - location in byte array of first byte to write.
length - number of bytes to write. If offset plus length is greater than the size of the byte array, then less than length bytes will be written - only those in the byte array.

write

public void write(int i)
Deprecated. 
Write to the LoggerStream.

Specified by:
write in class java.io.OutputStream
Parameters:
i - int written as a character to the LoggerStream.

getBufferSize

public int getBufferSize()
Deprecated. 
Get the size of the LoggerStream buffer.


setBufferSize

public void setBufferSize(int bufferSize)
Deprecated. 
Set the size of the LoggerStream buffer. If the length of the data in the buffer is greater than the new buffer size, then all data in the buffer will be flushed.


***  This class provides Binary Compatibility only, not Source Compatibility  ***




Copyright © 2009 SAS Institute Inc. All Rights Reserved.