Package org.pentaho.di.core.util
Class SortedFileOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.FileOutputStream
-
- org.pentaho.di.core.util.SortedFileOutputStream
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
public class SortedFileOutputStream extends FileOutputStream
-
-
Constructor Summary
Constructors Constructor Description SortedFileOutputStream(File file)
CT
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
If internally stored content is available, sorting keys of content, then sending content to file.void
flush()
Catchflush
method, don't do nothingvoid
setLogger(LogChannelInterface log)
Settervoid
write(byte[] b)
Appending to internal StringBuilder, instead of immediately writing to the filevoid
write(byte[] b, int off, int len)
Appending to internal StringBuilder, instead of immediately writing to the filevoid
write(int b)
Appending to internal StringBuilder, instead of immediately writing to the file-
Methods inherited from class java.io.FileOutputStream
finalize, getChannel, getFD
-
Methods inherited from class java.io.OutputStream
nullOutputStream
-
-
-
-
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 StringBuilder, instead of immediately writing to the file- Overrides:
write
in classFileOutputStream
- Throws:
IOException
-
write
public void write(byte[] b) throws IOException
Appending to internal StringBuilder, instead of immediately writing to the file- Overrides:
write
in classFileOutputStream
- Throws:
IOException
-
write
public void write(int b) throws IOException
Appending to internal StringBuilder, instead of immediately writing to the file- Overrides:
write
in classFileOutputStream
- Throws:
IOException
-
flush
public void flush() throws IOException
Catchflush
method, don't do nothing- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
close
public void close() throws IOException
If internally stored content is available, sorting keys of content, then sending content to file. Then callingFileOutputStream.close()
method.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classFileOutputStream
- Throws:
IOException
-
-