public class HecByteArrayOutputStream
extends java.io.ByteArrayOutputStream
| Constructor and Description |
|---|
HecByteArrayOutputStream(HecFileImpl parentFile)
Constructs a byte[] sized at _bufSize
|
HecByteArrayOutputStream(HecFileImpl parentFile,
boolean append)
Constructs a byte[] sized at _bufSize which uses the boolean flag
to determine if data is appended.
|
HecByteArrayOutputStream(int size,
HecFileImpl parentFile,
boolean append)
Constructs a byte[] of specified size and uses the boolean flag
to determine if data is appended.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
finalSave()
Saves the byte[] to the parent file
|
void |
flush()
Over-ridden flush to make sure that the data gets saved.
|
void |
incrementalSave()
Saves the byte[] to the parent file
|
void |
setParentFile(HecFileImpl parentFile)
Set the parent HecFileImpl
|
void |
write(byte[] b,
int off,
int len)
Over-ridden write of a byte[] with and offset and length,
that will save itself if the buffer is filled.
|
void |
write(int b)
Over-ridden write that will save itself if the buffer is
filled.
|
void |
writeToCachedFile(byte[] buf) |
public HecByteArrayOutputStream(HecFileImpl parentFile)
public HecByteArrayOutputStream(HecFileImpl parentFile, boolean append)
public HecByteArrayOutputStream(int size,
HecFileImpl parentFile,
boolean append)
public void setParentFile(HecFileImpl parentFile)
public void incrementalSave()
public void finalSave()
public void write(byte[] b,
int off,
int len)
write in class java.io.ByteArrayOutputStreampublic void write(int b)
write in class java.io.ByteArrayOutputStreampublic void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.ByteArrayOutputStreamjava.io.IOExceptionpublic void writeToCachedFile(byte[] buf)