Package org.teiid.common.buffer

Examples of org.teiid.common.buffer.FileStore.createOutputStream()


    }
   
    @Test public void testFlush() throws Exception {
      FileStorageManager sm = getStorageManager(null, 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());
    }
View Full Code Here


      FileStorageManager sm = getStorageManager(1024, null, null);
        String tsID = "0";     //$NON-NLS-1$
        // Add one batch
        FileStore store = sm.createFileStore(tsID);
        String contentOrig = new String("some file content this will stored in same tmp file with another");
        OutputStream out = store.createOutputStream();
        out.write(contentOrig.getBytes(), 0, contentOrig.getBytes().length);
        out.close();

        out = store.createOutputStream();
        long start = store.getLength();
View Full Code Here

        String contentOrig = new String("some file content this will stored in same tmp file with another");
        OutputStream out = store.createOutputStream();
        out.write(contentOrig.getBytes(), 0, contentOrig.getBytes().length);
        out.close();

        out = store.createOutputStream();
        long start = store.getLength();
        byte[] bytesOrig = new byte[2048];
        r.nextBytes(bytesOrig);
        out.write(bytesOrig, 0, 2048);
       
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.