org.pentaho.di.core.util
Class SortedFileOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FileOutputStream
          extended by org.pentaho.di.core.util.SortedFileOutputStream
All Implemented Interfaces:
Closeable, Flushable

public class SortedFileOutputStream
extends FileOutputStream


Constructor Summary
SortedFileOutputStream(File file)
          CT
 
Method Summary
 void close()
          If internally stored content is available, sorting keys of content, then sending content to file.
 void flush()
          Catch flush method, don't do nothing
 void setLogger(LogChannelInterface log)
          Setter
 void write(byte[] b)
          Appending to internal StringBuffer, instead of immediately writing to the file
 void write(byte[] b, int off, int len)
          Appending to internal StringBuffer, instead of immediately writing to the file
 void write(int b)
          Appending to internal StringBuffer, instead of immediately writing to the file
 
Methods inherited from class java.io.FileOutputStream
getChannel, getFD
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SortedFileOutputStream

public SortedFileOutputStream(File file)
                       throws FileNotFoundException
CT

Parameters:
file -
Throws:
FileNotFoundException
Method Detail

setLogger

public void setLogger(LogChannelInterface log)
Setter

Parameters:
log -

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
Appending to internal StringBuffer, instead of immediately writing to the file

Overrides:
write in class FileOutputStream
Throws:
IOException

write

public void write(byte[] b)
           throws IOException
Appending to internal StringBuffer, instead of immediately writing to the file

Overrides:
write in class FileOutputStream
Throws:
IOException

write

public void write(int b)
           throws IOException
Appending to internal StringBuffer, instead of immediately writing to the file

Overrides:
write in class FileOutputStream
Throws:
IOException

flush

public void flush()
           throws IOException
Catch flush method, don't do nothing

Specified by:
flush in interface Flushable
Overrides:
flush in class OutputStream
Throws:
IOException

close

public void close()
           throws IOException
If internally stored content is available, sorting keys of content, then sending content to file. Then calling FileOutputStream.close() method.

Specified by:
close in interface Closeable
Overrides:
close in class FileOutputStream
Throws:
IOException