Package org.teiid.common.buffer.FileStore

Examples of org.teiid.common.buffer.FileStore.FileStoreOutputStream


      if (this.result == null) {
        this.result = buildResult();
      }
     
      try {
        FileStoreOutputStream fs = this.result.getOuputStream();
      fs.close();
   
      if (fs.bytesWritten()) {
        return new BlobType(new BlobImpl(result));
      }
      return new BlobType(new SerialBlob(Arrays.copyOf(fs.getBuffer(), fs.getCount())));
    } catch (IOException e) {
      throw new TeiidProcessingException(e);
    catch (SQLException e) {
      throw new TeiidProcessingException(e);
    }
View Full Code Here


    }
   
    @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

TOP

Related Classes of org.teiid.common.buffer.FileStore.FileStoreOutputStream

Copyright © 2018 www.massapicom. 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.