Examples of ByteArrayInputStream

@author Michael Zhou
  • com.alibaba.common.lang.io.ByteArrayInputStream
    非同步的ByteArrayInputStream替换方案, 本代码移植自IBM developer works精彩文章, 参见package文档. @author Michael Zhou @version $Id: ByteArrayInputStream.java 509 2004-02-16 05:42:07Z baobao $
  • com.zaranux.client.crypto.ByteArrayInputStream
    A ByteArrayInputStream contains an internal buffer that contains bytes that may be read from the stream. An internal counter keeps track of the next byte to be supplied by the read method.

    Closing a ByteArrayInputStream 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 @see java.io.StringBufferInputStream @since JDK1.0

  • java.io.ByteArrayInputStream
    ByteArrayInputStream is used for streaming over a byte array. @see ByteArrayOutputStream
  • net.gleamynode.netty.array.ByteArrayInputStream
    @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 ByteArrayOutputStream @see ByteArrayBufferInputStream @apiviz.uses net.gleamynode.netty.array.ByteArray
  • org.apache.activeio.util.ByteArrayInputStream
  • org.apache.activemq.util.ByteArrayInputStream
    Very similar to the java.io.ByteArrayInputStream but this version is not thread safe.
  • org.apache.kahadb.util.ByteArrayInputStream
    Very similar to the java.io.ByteArrayInputStream but this version is not thread safe.
  • org.fusesource.hawtbuf.ByteArrayInputStream
    irino.com">Hiram Chirino

  • Examples of java.io.ByteArrayInputStream

          domain.addTypeModel(ByteArrayInputStream.class);

          SerializationContext context = new SerializationContext(domain);
          try
          {
             context.write(new ByteArrayInputStream(new byte[0]));
             fail();
          }
          catch (NotSerializableException e)
          {
          }
    View Full Code Here

    Examples of java.io.ByteArrayInputStream

            case Value.STRING_IGNORECASE:
                return ValueStringIgnoreCase.get(randomString(random.nextInt(100)));
            case Value.BLOB: {
                int len = (int) Math.abs(random.nextGaussian() * 10);
                byte[] data = randomBytes(len);
                return getLobStorage().createBlob(new ByteArrayInputStream(data), len);
            }
            case Value.CLOB: {
                int len = (int) Math.abs(random.nextGaussian() * 10);
                String s = randomString(len);
                return getLobStorage().createClob(new StringReader(s), len);
    View Full Code Here

    Examples of java.io.ByteArrayInputStream

                return;
           
            try {
                byte[] cmapBytes = PdfReader.getStreamBytes((PRStream)PdfReader.getPdfObjectRelease(toUni));
                CMapParser cmapParser = new CMapParser();
                cmap = cmapParser.parse(new ByteArrayInputStream(cmapBytes));
            } catch (IOException e) {
                throw new Error("Unable to obtain cmap - " + e.getMessage(), e);
            }

        }
    View Full Code Here

    Examples of java.io.ByteArrayInputStream

       /**
        *  Write a byte array to a file.
        */
        public static void write(byte[] data, String fileName) throws IOException {
            ByteArrayInputStream bais = null;
            InputStream is = null;
            try {
                bais = new ByteArrayInputStream(data);
                is = new BufferedInputStream(bais);
       
                write(is, fileName)
            } finally {
                if (is != null) {
                    is.close();
                }
                if (bais != null) {
                    bais.close();
                }
            }
        }
    View Full Code Here

    Examples of net.gleamynode.netty.array.ByteArrayInputStream

            if (dataLen > maxObjectSize) {
                throw new StreamCorruptedException(
                        "data length too big: " + dataLen + " (max: " + maxObjectSize + ')');
            }
            ByteArray data = buffer.read(dataLen);
            return new CompactObjectInputStream(new ByteArrayInputStream(data)).readObject();
        }
    View Full Code Here

    Examples of org.apache.activeio.util.ByteArrayInputStream

            try {
                connection = factory.getDataSource().getConnection();
                byte[] data = factory.getAdapter().doLoadData(connection, name + ":" + id);
                Object result = null;
                if (data != null) {
                    ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(data));
                    result = ois.readObject();
                    factory.getAdapter().doRemoveData(connection, name + ":" + id);
                }
                return result;
            } catch (Exception e) {
    View Full Code Here

    Examples of org.apache.activemq.util.ByteArrayInputStream

        @Test
        public void testLogFile() throws Exception {
            FileSystem fs = dfsCluster.getFileSystem();
            OutputStream out = fs.create(logFile);
            InputStream in = new ByteArrayInputStream(
                    ("instancePaths=/falcon/feed/agg-logs/path1/2010/10/10/20,"
                            + "/falcon/feed/agg-logs/path1/2010/10/10/21,"
                            + "/falcon/feed/agg-logs/path1/2010/10/10/22,"
                            + "/falcon/feed/agg-logs/path1/2010/10/10/23")
                            .getBytes());
    View Full Code Here

    Examples of org.apache.kahadb.util.ByteArrayInputStream

        }

        @Test
        public void testXmlUpdateInputStream() throws Exception
        {
            InputStream xmlis = new ByteArrayInputStream(sampleXml.getBytes());
            client.send("vm://input-10-is", xmlis, null);
            FlowAssert.verify("process-order-update-is");
        }
    View Full Code Here

    Examples of org.fusesource.hawtbuf.ByteArrayInputStream

                }
            }
        }

        private Map<String, Object> unmarsallProperties(Buffer marshalledProperties) throws IOException {
            return MarshallingSupport.unmarshalPrimitiveMap(new DataInputStream(new ByteArrayInputStream(marshalledProperties)));
        }
    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.