com.myJava.file.multivolumes
Class VolumeOutputStream
java.lang.Object
java.io.OutputStream
com.myJava.file.multivolumes.VolumeOutputStream
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable
public class VolumeOutputStream
- extends java.io.OutputStream
Outputstream implementation that slices the output into multiple volumes.
- Author:
- Olivier PETRUCCI
Areca Build ID : 7299034069467778562
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
strategy
protected VolumeStrategy strategy
out
protected java.io.OutputStream out
currentVolumeSize
protected long currentVolumeSize
totalWritten
protected long totalWritten
volumeSize
protected long volumeSize
- Volume Size (bytes)
VolumeOutputStream
public VolumeOutputStream(VolumeStrategy strategy,
long volumeSize)
getStrategy
public VolumeStrategy getStrategy()
close
public void close()
throws java.io.IOException
- Specified by:
close
in interface java.io.Closeable
- Overrides:
close
in class java.io.OutputStream
- Throws:
java.io.IOException
flush
public void flush()
throws java.io.IOException
- Specified by:
flush
in interface java.io.Flushable
- Overrides:
flush
in class java.io.OutputStream
- Throws:
java.io.IOException
getTotalWritten
public long getTotalWritten()
getWrittenInCurrentVolume
public long getWrittenInCurrentVolume()
write
public void write(byte[] b,
int off,
int len)
throws java.io.IOException
- Overrides:
write
in class java.io.OutputStream
- Throws:
java.io.IOException
write
public void write(byte[] b)
throws java.io.IOException
- Overrides:
write
in class java.io.OutputStream
- Throws:
java.io.IOException
write
public void write(int b)
throws java.io.IOException
- Specified by:
write
in class java.io.OutputStream
- Throws:
java.io.IOException
ensureCapacity
public void ensureCapacity(long length)
throws java.io.IOException
- Throws:
java.io.IOException