org.teiid.common.buffer
Class FileStore

java.lang.Object
  extended by org.teiid.common.buffer.FileStore
Direct Known Subclasses:
FileStorageManager.DiskStore

public abstract class FileStore
extends java.lang.Object


Nested Class Summary
 class FileStore.FileStoreOutputStream
          A customized buffered stream with an exposed buffer
 
Field Summary
protected  long len
           
 
Constructor Summary
FileStore()
           
 
Method Summary
 java.io.InputStream createInputStream(long start)
           
 java.io.OutputStream createOutputStream()
           
 FileStore.FileStoreOutputStream createOutputStream(int maxMemorySize)
           
 long getLength()
           
 int read(long fileOffset, byte[] b, int offSet, int length)
           
protected abstract  int readDirect(long fileOffset, byte[] b, int offSet, int length)
           
 void readFully(long fileOffset, byte[] b, int offSet, int length)
           
 void remove()
           
protected abstract  void removeDirect()
           
 void setCleanupReference(java.lang.Object o)
           
 void write(byte[] bytes)
           
 long write(byte[] bytes, int offset, int length)
           
protected abstract  void writeDirect(byte[] bytes, int offset, int length)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

len

protected long len
Constructor Detail

FileStore

public FileStore()
Method Detail

setCleanupReference

public void setCleanupReference(java.lang.Object o)

getLength

public long getLength()

read

public int read(long fileOffset,
                byte[] b,
                int offSet,
                int length)
         throws TeiidComponentException
Throws:
TeiidComponentException

readDirect

protected abstract int readDirect(long fileOffset,
                                  byte[] b,
                                  int offSet,
                                  int length)
                           throws TeiidComponentException
Throws:
TeiidComponentException

readFully

public void readFully(long fileOffset,
                      byte[] b,
                      int offSet,
                      int length)
               throws TeiidComponentException
Throws:
TeiidComponentException

write

public void write(byte[] bytes)
           throws TeiidComponentException
Throws:
TeiidComponentException

write

public long write(byte[] bytes,
                  int offset,
                  int length)
           throws TeiidComponentException
Throws:
TeiidComponentException

writeDirect

protected abstract void writeDirect(byte[] bytes,
                                    int offset,
                                    int length)
                             throws TeiidComponentException
Throws:
TeiidComponentException

remove

public void remove()

removeDirect

protected abstract void removeDirect()

createInputStream

public java.io.InputStream createInputStream(long start)

createOutputStream

public java.io.OutputStream createOutputStream()

createOutputStream

public FileStore.FileStoreOutputStream createOutputStream(int maxMemorySize)


Copyright © 2010. All Rights Reserved.