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

        dataOut.write(b);
      }

      private void startMessage(char newMessageType) {
        this.messageType = newMessageType;
        this.outBuffer = new ByteArrayOutputStream();
        this.dataOut = new DataOutputStream(this.outBuffer);
      }
    View Full Code Here

    Examples of java.io.ByteArrayOutputStream

      /**
       * Create a MemoryAppender whose buffer has the given initial size.
       * @param size Initial size of buffer.
       */
      public MemoryAppender(int initSize) {
        super(new ByteArrayOutputStream(initSize));
      }
    View Full Code Here

    Examples of java.io.ByteArrayOutputStream

            }
           
            this.monitorInterval = client.getMonitorInterval();
            this.monitor = client.getProgressMonitor();
            this.chunk = new byte[client.getTransferBufferSize()];
            this.out = new ByteArrayOutputStream(client.getTransferBufferSize());
            this.isASCII = (client.getType().equals(FTPTransferType.ASCII));
        }
    View Full Code Here

    Examples of java.io.ByteArrayOutputStream

          result[current++] = new Double(Utils.missingValue());
          result[current++] = new Double(Utils.missingValue());
        }
       
        // sizes
        ByteArrayOutputStream bastream = new ByteArrayOutputStream();
        ObjectOutputStream oostream = new ObjectOutputStream(bastream);
        oostream.writeObject(m_Classifier);
        result[current++] = new Double(bastream.size());
        bastream = new ByteArrayOutputStream();
        oostream = new ObjectOutputStream(bastream);
        oostream.writeObject(train);
        result[current++] = new Double(bastream.size());
        bastream = new ByteArrayOutputStream();
        oostream = new ObjectOutputStream(bastream);
        oostream.writeObject(test);
        result[current++] = new Double(bastream.size());
       
        if (m_Classifier instanceof Summarizable) {
          result[current++] = ((Summarizable)m_Classifier).toSummaryString();
        } else {
          result[current++] = null;
    View Full Code Here

    Examples of java.io.ByteArrayOutputStream

          result[current++] = new Double(Utils.missingValue());
          result[current++] = new Double(Utils.missingValue());
        }

        // sizes
        ByteArrayOutputStream bastream = new ByteArrayOutputStream();
        ObjectOutputStream oostream = new ObjectOutputStream(bastream);
        oostream.writeObject(m_Classifier);
        result[current++] = new Double(bastream.size());
        bastream = new ByteArrayOutputStream();
        oostream = new ObjectOutputStream(bastream);
        oostream.writeObject(train);
        result[current++] = new Double(bastream.size());
        bastream = new ByteArrayOutputStream();
        oostream = new ObjectOutputStream(bastream);
        oostream.writeObject(test);
        result[current++] = new Double(bastream.size());
       
        // Prediction interval statistics
        result[current++] = new Double(eval.coverageOfTestCasesByPredictedRegions());
        result[current++] = new Double(eval.sizeOfPredictedRegions());
    View Full Code Here

    Examples of java.io.ByteArrayOutputStream

          result[current++] = new Double(Utils.missingValue());
          result[current++] = new Double(Utils.missingValue());
        }
       
        // sizes
        ByteArrayOutputStream bastream = new ByteArrayOutputStream();
        ObjectOutputStream oostream = new ObjectOutputStream(bastream);
        oostream.writeObject(m_Classifier);
        result[current++] = new Double(bastream.size());
        bastream = new ByteArrayOutputStream();
        oostream = new ObjectOutputStream(bastream);
        oostream.writeObject(train);
        result[current++] = new Double(bastream.size());
        bastream = new ByteArrayOutputStream();
        oostream = new ObjectOutputStream(bastream);
        oostream.writeObject(test);
        result[current++] = new Double(bastream.size());
       
        // Prediction interval statistics
        result[current++] = new Double(eval.coverageOfTestCasesByPredictedRegions());
        result[current++] = new Double(eval.sizeOfPredictedRegions());
    View Full Code Here

    Examples of java.io.ByteArrayOutputStream

            // if a WSDL was found
            if (wsdlElement != null) {
                OMNamespace wsdlNamespace = wsdlElement.getNamespace();

                // serialize and create an input stream to read WSDL
                ByteArrayOutputStream baos = new ByteArrayOutputStream();
                try {
                    if (trace()) trace.info("Serializing wsdlElement found to build an Axis2 service");
                    wsdlElement.serialize(baos);
                    wsdlInputStream = new ByteArrayInputStream(baos.toByteArray());
                } catch (XMLStreamException e) {
                    handleException("Error converting to a StreamSource", e);
                }

                if (wsdlInputStream != null) {
    View Full Code Here

    Examples of java.io.ByteArrayOutputStream

      public static byte[] readStream(InputStream stream) {
        if(stream == null) {
          throw new IllegalArgumentException("null 'stream' arg passed in method call.");
        }
       
        ByteArrayOutputStream outBuffer = new ByteArrayOutputStream();
        byte[] buffer = new byte[256];
        int readCount = 0;
       
        try {
          while((readCount = stream.read(buffer)) != -1) {
            outBuffer.write(buffer, 0, readCount);
          }
        } catch (IOException e) {
          throw new IllegalStateException("Error reading stream.", e);
        }   
       
        return outBuffer.toByteArray();
      }
    View Full Code Here

    Examples of java.io.ByteArrayOutputStream

                        synLog.traceOrDebug("Storing the response for the message with ID : " +
                            synCtx.getMessageID() + " with request hash ID : " +
                            cachedObj.getRequestHash() + " in the cache : " + cacheKey);
                    }

                    ByteArrayOutputStream outStream = new ByteArrayOutputStream();
                    try {
                        MessageHelper.cloneSOAPEnvelope(synCtx.getEnvelope()).serialize(outStream);
                        cachedObj.setResponseEnvelope(outStream.toByteArray());
                    } catch (XMLStreamException e) {
                        handleException("Unable to set the response to the Cache", e, synCtx);
                    }

                    /* this is not required yet, can commented this for perf improvements
    View Full Code Here

    Examples of java.io.ByteArrayOutputStream

                    String szFormat = vFormat.toString();
                    if (szFormat == this.szCaptureFormat) {
                        break;
                    }
                }
                ByteArrayOutputStream baos = new ByteArrayOutputStream();
                DataOutputStream dos = new DataOutputStream(baos);
                dos.writeInt(nSource);
                dos.writeInt(nCapture);
                dos.writeInt(this.nCurrentHeight);
                dos.writeInt(this.nCurrentWidth);
                dos.flush();
                baos.flush();
                byte[] bRes = baos.toByteArray();
                dos = null;
                baos = null;
                rs.addRecord(bRes, 0, bRes.length);
                bRes = null;
                rs.closeRecordStore();
    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.