java.lang.Object
java.io.OutputStream
eu.steffo.cleaver.logic.split.SplitFileOutputStream
- All Implemented Interfaces:
java.io.Closeable
,java.io.Flushable
,java.lang.AutoCloseable
public class SplitFileOutputStream
extends java.io.OutputStream
-
Field Summary
Fields Modifier and Type Field Description protected long
currentByteCount
protected int
currentFileCount
protected java.io.FileOutputStream
currentFileOutputStream
protected java.lang.String
fileBaseName
protected long
maximumByteCount
-
Constructor Summary
Constructors Constructor Description SplitFileOutputStream(java.lang.String fileBaseName, long maximumByteCount)
-
Method Summary
Modifier and Type Method Description void
close()
protected void
createNextFileOutputStream()
void
write(int b)
-
Field Details
-
fileBaseName
protected java.lang.String fileBaseName -
currentFileOutputStream
protected java.io.FileOutputStream currentFileOutputStream -
currentByteCount
protected long currentByteCount -
maximumByteCount
protected long maximumByteCount -
currentFileCount
protected int currentFileCount
-
-
Constructor Details
-
SplitFileOutputStream
public SplitFileOutputStream(java.lang.String fileBaseName, long maximumByteCount)
-
-
Method Details
-
createNextFileOutputStream
protected void createNextFileOutputStream() throws java.io.IOException- Throws:
java.io.IOException
-
write
public void write(int b) throws java.io.IOException- Specified by:
write
in classjava.io.OutputStream
- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classjava.io.OutputStream
- Throws:
java.io.IOException
-