Search in sources :

Example 6 with FileStoreOutputStream

use of org.teiid.common.buffer.FileStore.FileStoreOutputStream in project teiid by teiid.

the class TestFileStorageManager method testFlush.

@Test
public void testFlush() throws Exception {
    FileStorageManager sm = getStorageManager(null, null);
    FileStore store = sm.createFileStore("0");
    FileStoreOutputStream fsos = store.createOutputStream(2);
    fsos.write(new byte[3]);
    fsos.write(1);
    fsos.flush();
    assertEquals(0, fsos.getCount());
}
Also used : FileStore(org.teiid.common.buffer.FileStore) FileStoreOutputStream(org.teiid.common.buffer.FileStore.FileStoreOutputStream) Test(org.junit.Test)

Aggregations

FileStoreOutputStream (org.teiid.common.buffer.FileStore.FileStoreOutputStream)6 Test (org.junit.Test)4 FileStore (org.teiid.common.buffer.FileStore)3 BlobImpl (org.teiid.core.types.BlobImpl)3 BlobType (org.teiid.core.types.BlobType)3 IOException (java.io.IOException)2 SQLException (java.sql.SQLException)2 SerialBlob (javax.sql.rowset.serial.SerialBlob)2 TeiidProcessingException (org.teiid.core.TeiidProcessingException)2 ClobImpl (org.teiid.core.types.ClobImpl)2 ClobType (org.teiid.core.types.ClobType)2 ByteArrayInputStream (java.io.ByteArrayInputStream)1 StringReader (java.io.StringReader)1 InputStreamFactory (org.teiid.core.types.InputStreamFactory)1 ReaderInputStream (org.teiid.core.util.ReaderInputStream)1