GigaSpaces XAP 9.7.2 API

com.sun.jini.reliableLog
Class LogOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by com.sun.jini.reliableLog.LogOutputStream
All Implemented Interfaces:
Closeable, Flushable

public class LogOutputStream
extends OutputStream

This class extends the functionality of the java.io.OutputStream class in order to provide an output mechanism that can be used by processes that perform logging operations; in particular, processes that store state in order to provide persistence.

Author:
Sun Microsystems, Inc.
See Also:
OutputStream

Constructor Summary
LogOutputStream(RandomAccessFile raf)
          Creates an output file with the specified RandomAccessFile
 
Method Summary
 void close()
          A LogOutputStream cannot be closed, so this does nothing.
 void write(byte[] b)
          Writes an array of bytes.
 void write(byte[] b, int off, int len)
          Writes a sub-array of bytes.
 void write(int b)
          Writes a byte of data.
 
Methods inherited from class java.io.OutputStream
flush
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogOutputStream

public LogOutputStream(RandomAccessFile raf)
                throws IOException
Creates an output file with the specified RandomAccessFile

Parameters:
raf - the output file
Throws:
IOException - If an I/O error has occurred.
Method Detail

write

public void write(int b)
           throws IOException
Writes a byte of data. This method will block until the byte is actually written.

Specified by:
write in class OutputStream
Parameters:
b - the byte to be written
Throws:
IOException - If an I/O error has occurred.

write

public void write(byte[] b)
           throws IOException
Writes an array of bytes. Will block until the bytes are actually written.

Overrides:
write in class OutputStream
Parameters:
b - the data to be written
Throws:
IOException - If an I/O error has occurred.

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
Writes a sub-array of bytes.

Overrides:
write in class OutputStream
Parameters:
b - the data to be written
off - the start offset in the data
len - the number of bytes to write
Throws:
IOException - If an I/O error has occurred.

close

public final void close()
                 throws IOException
A LogOutputStream cannot be closed, so this does nothing.

Specified by:
close in interface Closeable
Overrides:
close in class OutputStream
Throws:
IOException - If an I/O error has occurred.

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.