Package org.teiid.common.buffer

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


        byte[] bytesOrig = new byte[2048];
        r.nextBytes(bytesOrig);
        out.write(bytesOrig, 0, 2048);
       
        byte[] readContent = new byte[2048];
        InputStream in = store.createInputStream(0, contentOrig.getBytes().length);       
      int c = in.read(readContent, 0, 3000);
         assertEquals(contentOrig, new String(readContent, 0, c));        
         c = in.read(readContent, 0, 3000);
         assertEquals(-1, c);
         in.close();
View Full Code Here


         assertEquals(contentOrig, new String(readContent, 0, c));        
         c = in.read(readContent, 0, 3000);
         assertEquals(-1, c);
         in.close();
       
        in = store.createInputStream(start, 2048);
        c = in.read(readContent, 0, 3000);
        assertTrue(Arrays.equals(bytesOrig, readContent));
         c = in.read(readContent, 0, 3000);
         assertEquals(-1, c);
         in.close();       
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.