Package org.teiid.common.buffer
Class FileStore.FileStoreOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- org.teiid.common.buffer.FileStore.FileStoreOutputStream
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
- Enclosing class:
- FileStore
public final class FileStore.FileStoreOutputStream extends OutputStream
A customized buffered stream with an exposed buffer
-
-
Constructor Summary
Constructors Constructor Description FileStoreOutputStream(int size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
bytesWritten()
void
close()
void
flush()
void
flushBuffer()
byte[]
getBuffer()
Return the buffer.int
getCount()
void
write(byte[] b, int off, int len)
void
write(int b)
-
Methods inherited from class java.io.OutputStream
write
-
-
-
-
Method Detail
-
write
public void write(int b) throws IOException
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
write
public void write(byte[] b, int off, int len) throws IOException
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
flushBuffer
public void flushBuffer() throws IOException
- Throws:
IOException
-
getBuffer
public byte[] getBuffer()
Return the buffer. Can be null if closed and the underlying filestore has been written to.- Returns:
-
getCount
public int getCount()
-
bytesWritten
public boolean bytesWritten()
-
flush
public void flush() throws IOException
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-
-