public class CountingFileOutputStream extends FileOutputStream
FileOutputStream sub class that keeps track of all written
bytes for the statistics handler.| Modifier and Type | Field and Description |
|---|---|
static EAppend |
DEFAULT_APPEND
By default append is enabled
|
| Constructor and Description |
|---|
CountingFileOutputStream(File aFile) |
CountingFileOutputStream(File aFile,
EAppend eAppend) |
CountingFileOutputStream(String sFilename) |
CountingFileOutputStream(String sFilename,
EAppend eAppend) |
| Modifier and Type | Method and Description |
|---|---|
long |
getBytesWritten() |
String |
toString() |
void |
write(byte[] b) |
void |
write(byte[] b,
int nOffset,
int nLength) |
void |
write(int b) |
close, finalize, getChannel, getFDflushpublic static final EAppend DEFAULT_APPEND
public CountingFileOutputStream(@Nonnull File aFile) throws FileNotFoundException
FileNotFoundExceptionpublic CountingFileOutputStream(@Nonnull File aFile, @Nonnull EAppend eAppend) throws FileNotFoundException
FileNotFoundExceptionpublic CountingFileOutputStream(@Nonnull String sFilename) throws FileNotFoundException
FileNotFoundExceptionpublic CountingFileOutputStream(@Nonnull String sFilename, @Nonnull EAppend eAppend) throws FileNotFoundException
FileNotFoundExceptionpublic void write(int b)
throws IOException
write in class FileOutputStreamIOExceptionpublic void write(byte[] b)
throws IOException
write in class FileOutputStreamIOExceptionpublic void write(byte[] b,
int nOffset,
int nLength)
throws IOException
write in class FileOutputStreamIOException@Nonnegative public long getBytesWritten()
Copyright © 2014–2022 Philip Helger. All rights reserved.