Package org.teiid.common.buffer
Class FileStore
- java.lang.Object
-
- org.teiid.common.buffer.FileStore
-
- All Implemented Interfaces:
AutoCleanupUtil.Removable
- Direct Known Subclasses:
FileStorageManager.DiskStore
,SplittableStorageManager.SplittableFileStore
public abstract class FileStore extends Object implements AutoCleanupUtil.Removable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
FileStore.FileStoreOutputStream
A customized buffered stream with an exposed buffer
-
Constructor Summary
Constructors Constructor Description FileStore()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description InputStream
createInputStream(long start)
ExtensibleBufferedInputStream
createInputStream(long start, long length)
OutputStream
createOutputStream()
FileStore.FileStoreOutputStream
createOutputStream(int maxMemorySize)
abstract long
getLength()
int
read(long fileOffset, byte[] b, int offSet, int length)
void
readFully(long fileOffset, byte[] b, int offSet, int length)
protected abstract int
readWrite(long fileOffset, byte[] b, int offSet, int length, boolean write)
void
remove()
protected abstract void
removeDirect()
abstract void
setLength(long length)
void
write(byte[] bytes, int offset, int length)
void
write(long start, byte[] bytes, int offset, int length)
-
-
-
Method Detail
-
getLength
public abstract long getLength()
-
setLength
public abstract void setLength(long length) throws IOException
- Throws:
IOException
-
read
public int read(long fileOffset, byte[] b, int offSet, int length) throws IOException
- Throws:
IOException
-
readWrite
protected abstract int readWrite(long fileOffset, byte[] b, int offSet, int length, boolean write) throws IOException
- Throws:
IOException
-
readFully
public void readFully(long fileOffset, byte[] b, int offSet, int length) throws IOException
- Throws:
IOException
-
write
public void write(byte[] bytes, int offset, int length) throws IOException
- Throws:
IOException
-
write
public void write(long start, byte[] bytes, int offset, int length) throws IOException
- Throws:
IOException
-
remove
public void remove()
- Specified by:
remove
in interfaceAutoCleanupUtil.Removable
-
removeDirect
protected abstract void removeDirect()
-
createInputStream
public ExtensibleBufferedInputStream createInputStream(long start, long length)
-
createInputStream
public InputStream createInputStream(long start)
-
createOutputStream
public OutputStream createOutputStream()
-
createOutputStream
public FileStore.FileStoreOutputStream createOutputStream(int maxMemorySize)
-
-