Examples of createOutputStream()


Examples of org.pdfbox.pdmodel.common.PDStream.createOutputStream()

        try
        {
            PDStream src = page.getContents();
            PDStream dest = new PDStream( new COSStream( src.getStream(), document.getScratchFile() ) );
            importedPage.setContents( dest );
            os = dest.createOutputStream();

            byte[] buf = new byte[10240];
            int amountRead = 0;
            is = src.createInputStream();
            while((amountRead = is.read(buf,0,10240)) > -1)
View Full Code Here

Examples of org.red5.server.net.rtmp.RTMPConnection.createOutputStream()

    IStreamCapableConnection streamConn = stream.getConnection();
    if (streamConn != null && streamConn instanceof RTMPConnection) {
      RTMPConnection conn = (RTMPConnection) streamConn;
      // TODO Better manage channels.
      // now we use OutputStream as a channel wrapper.
      OutputStream o = conn.createOutputStream(stream.getStreamId());
      IPipe pipe = new InMemoryPushPushPipe();
      pipe.subscribe(new ConnectionConsumer(conn, o.getVideo(), o.getAudio(), o.getData()), null);
      return pipe;
    }
    return null;
View Full Code Here

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

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

      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

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

        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.