Examples of ByteArrayOutputStream

@author Michael Zhou
  • com.alibaba.simpleimage.io.ByteArrayOutputStream
    本代码专为图片缓存使用,故默认缓冲区设得比较大 非同步的ByteArrayOutputStream替换方案, 执行toByteArray()方法时返回的是只读的内部字节数组, 避免了没有必要的字节复制. 本代码移植自IBM developer works精彩文章, 参见package文档. @author Michael Zhou @author wendell @version $Id: ByteArrayOutputStream.java 593 2004-02-26 13:47:19Z baobao $
  • com.ibm.jvm.util.ByteArrayOutputStream
  • com.zaranux.client.crypto.ByteArrayOutputStream
    This class implements an output stream in which the data is written into a byte array. The buffer automatically grows as data is written to it. The data can be retrieved using toByteArray() and toString().

    Closing a ByteArrayOutputStream has no effect. The methods in this class can be called after the stream has been closed without generating an IOException. @author Arthur van Hoff @since JDK1.0

  • java.io.ByteArrayOutputStream
    ByteArrayOutputStream is a class whose underlying stream is represented by a byte array. As bytes are written to this stream, the local byte array may be expanded to hold more bytes. @see ByteArrayInputStream
  • net.gleamynode.netty.array.ByteArrayOutputStream
    @author The Netty Project (netty@googlegroups.com) @author Trustin Lee (trustin@gmail.com) @version $Rev: 476 $, $Date: 2008-07-04 15:06:37 +0900 (Fri, 04 Jul 2008) $ @see ByteArrayInputStream @see ByteArrayBufferInputStream @apiviz.uses net.gleamynode.netty.array.CompositeByteArray
  • org.apache.activeio.util.ByteArrayOutputStream
  • org.apache.activemq.util.ByteArrayOutputStream
    Very similar to the java.io.ByteArrayOutputStream but this version is not thread safe and the resulting data is returned in a ByteSequence to avoid an extra byte[] allocation.
  • org.apache.axis.utils.ByteArrayOutputStream
    This class implements an output stream in which the data is written into a byte array. The buffer automatically grows as data is written to it.

    The data can be retrieved using toByteArray() and toString().

    Closing a ByteArrayOutputStream has no effect. The methods in this class can be called after the stream has been closed without generating an IOException.

    This is an alternative implementation of the java.io.ByteArrayOutputStream class. The original implementation only allocates 32 bytes at the beginning. As this class is designed for heavy duty it starts at 1024 bytes. In contrast to the original it doesn't reallocate the whole memory block but allocates additional buffers. This way no buffers need to be garbage collected and the contents don't have to be copied to the new buffer. This class is designed to behave exactly like the original. The only exception is the deprecated toString(int) method that has been ignored. @author Jeremias Maerki

  • org.apache.commons.io.output.ByteArrayOutputStream
    This class implements an output stream in which the data is written into a byte array. The buffer automatically grows as data is written to it.

    The data can be retrieved using toByteArray() and toString().

    Closing a ByteArrayOutputStream has no effect. The methods in this class can be called after the stream has been closed without generating an IOException.

    This is an alternative implementation of the java.io.ByteArrayOutputStream class. The original implementation only allocates 32 bytes at the beginning. As this class is designed for heavy duty it starts at 1024 bytes. In contrast to the original it doesn't reallocate the whole memory block but allocates additional buffers. This way no buffers need to be garbage collected and the contents don't have to be copied to the new buffer. This class is designed to behave exactly like the original. The only exception is the deprecated toString(int) method that has been ignored. @author Jeremias Maerki @version $Id: ByteArrayOutputStream.java 369075 2006-01-14 18:23:42Z scolebourne $

  • org.apache.wicket.util.io.ByteArrayOutputStream
    This class implements an output stream in which the data is written into a byte array. The buffer automatically grows as data is written to it.

    The data can be retrieved using toByteArray() and toString().

    Closing a ByteArrayOutputStream has no effect. The methods in this class can be called after the stream has been closed without generating an IOException.

    This is an alternative implementation of the java.io.ByteArrayOutputStream class. The original implementation only allocates 32 bytes at the beginning. As this class is designed for heavy duty it starts at 1024 bytes. In contrast to the original it doesn't reallocate the whole memory block but allocates additional buffers. This way no buffers need to be garbage collected and the contents don't have to be copied to the new buffer. This class is designed to behave exactly like the original. The only exception is the deprecated toString(int) method that has been ignored. @author Jeremias Maerki @version $Id$

  • org.fusesource.hawtbuf.ByteArrayOutputStream
    irino.com">Hiram Chirino
  • org.more.util.io.output.ByteArrayOutputStream
    This class implements an output stream in which the data is written into a byte array. The buffer automatically grows as data is written to it.

    The data can be retrieved using toByteArray() and toString().

    Closing a ByteArrayOutputStream has no effect. The methods in this class can be called after the stream has been closed without generating an IOException.

    This is an alternative implementation of the {@link java.io.ByteArrayOutputStream}class. The original implementation only allocates 32 bytes at the beginning. As this class is designed for heavy duty it starts at 1024 bytes. In contrast to the original it doesn't reallocate the whole memory block but allocates additional buffers. This way no buffers need to be garbage collected and the contents don't have to be copied to the new buffer. This class is designed to behave exactly like the original. The only exception is the deprecated toString(int) method that has been ignored. @version $Id: ByteArrayOutputStream.java 1304052 2012-03-22 20:55:29Z ggregory $

  • webit.script.util.ByteArrayOutputStream

  • Examples of java.io.ByteArrayOutputStream

                                                                                     boolean dispose) throws Exception {

            Marshaller marshaller = MarshallerFactory.newMarshaller( ksession.getKnowledgeBase(),
                                                                     new ObjectMarshallingStrategy[]{strategy} );

            ByteArrayOutputStream bos = new ByteArrayOutputStream();
            marshaller.marshall( bos,
                                 ksession );
            final byte[] b1 = bos.toByteArray();
            bos.close();

            ByteArrayInputStream bais = new ByteArrayInputStream( b1 );
            StatefulKnowledgeSession ksession2 = marshaller.unmarshall( bais,
                                                                        new SessionConfiguration(),
                                                                        EnvironmentFactory.newEnvironment() );
            bais.close();

            bos = new ByteArrayOutputStream();
            marshaller.marshall( bos,
                                 ksession2 );
            final byte[] b2 = bos.toByteArray();
            bos.close();

            // bytes should be the same.
            if ( !areByteArraysEqual( b1,
                                      b2 ) ) {
                throw new IllegalArgumentException( "byte streams for serialisation test are not equal" );
    View Full Code Here

    Examples of java.io.ByteArrayOutputStream

           
            StatefulKnowledgeSession ksession = new StatefulKnowledgeSessionImpl( (ReteooWorkingMemory) session );
            Marshaller marshaller = MarshallerFactory.newMarshaller( ksession.getKnowledgeBase() );
        

            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            marshaller.marshall( baos, ksession );
            byte[] b1 = baos.toByteArray();
            session.halt();
            session.dispose();
            Thread.sleep(400);
           
            ByteArrayInputStream bais = new ByteArrayInputStream( b1 );       
    View Full Code Here

    Examples of java.io.ByteArrayOutputStream

                // move to test directory
                ftp.chdir(testdir);
                ftp.setType(FTPTransferType.BINARY);
       
                // get file as output stream       
                ByteArrayOutputStream out = new ByteArrayOutputStream();
                ftp.get(out, remoteBinaryFile);
       
                // convert to byte array
                byte[] result1 = out.toByteArray();
       
                // put this
                String filename = generateRandomFilename();
                ftp.put(new ByteArrayInputStream(result1), filename);
       
    View Full Code Here

    Examples of java.io.ByteArrayOutputStream

            // we definitly need a node
            if (node == null) {
                throw new RuntimeException("First argument in Xml.write() is not an hopobject");
            }

            ByteArrayOutputStream out = new ByteArrayOutputStream();
            XmlWriter writer = new XmlWriter(out, "UTF-8");

            // in case we ever want to limit serialization depth...
            // if (arguments.length > 1 && arguments[1] instanceof ESNumber)
            //     writer.setMaxLevels(arguments[1].toInt32());
            writer.setDatabaseMode(dbmode);
            writer.write(node);
            writer.flush();
            return out.toString("UTF-8");
        }
    View Full Code Here

    Examples of java.io.ByteArrayOutputStream

       
        @Test public void larq_example_1() throws Exception
        {
            PrintStream pOut = System.out ;
            PrintStream pNull = new PrintStream(new ByteArrayOutputStream()) ;
            System.setOut(pNull) ;
            try {
                ExLucene1.main(null) ;
            } finally { System.setOut(pOut) ; }
        }
    View Full Code Here

    Examples of java.io.ByteArrayOutputStream

        }

        @Test public void larq_example_2() throws Exception
        {
            PrintStream pOut = System.out ;
            PrintStream pNull = new PrintStream(new ByteArrayOutputStream()) ;
            System.setOut(pNull) ;
            try {
                ExLucene2.main(null) ;
            } finally { System.setOut(pOut) ; }
        }
    View Full Code Here

    Examples of java.io.ByteArrayOutputStream

        }

        @Test public void larq_example_3() throws Exception
        {
            PrintStream pOut = System.out ;
            PrintStream pNull = new PrintStream(new ByteArrayOutputStream()) ;
            System.setOut(pNull) ;
            try {
                ExLucene3.main(null) ;
            } finally { System.setOut(pOut) ; }
        }
    View Full Code Here

    Examples of java.io.ByteArrayOutputStream

        }

        @Test public void larq_example_4() throws Exception
        {
            PrintStream pOut = System.out ;
            PrintStream pNull = new PrintStream(new ByteArrayOutputStream()) ;
            System.setOut(pNull) ;
            try {
                ExLucene4.main(null) ;
            } finally { System.setOut(pOut) ; }
        }
    View Full Code Here

    Examples of java.io.ByteArrayOutputStream

            } finally { System.setOut(pOut) ; }
        }
        @Test public void larq_example_5() throws Exception
        {
            PrintStream pOut = System.out ;
            PrintStream pNull = new PrintStream(new ByteArrayOutputStream()) ;
            System.setOut(pNull) ;
            try {
                ExLucene5.main(null) ;
            } finally { System.setOut(pOut) ; }
        }
    View Full Code Here

    Examples of java.io.ByteArrayOutputStream

            chooseTransferMode(remoteFile);
            boolean resetMode = true;
            try {       
                if (monitorEx != null)
                    monitorEx.transferStarted(TransferDirection.DOWNLOAD, remoteFile);
                ByteArrayOutputStream result = new ByteArrayOutputStream(transferBufferSize);
                getData(result, remoteFile);
                validateTransfer();
                downloadCount++;
                return result == null ? null : result.toByteArray();
            }
            catch (FTPException ex) {
                throw ex;
            }
            catch (ControlChannelIOException ex) {
    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.