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

                // 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.ByteArrayInputStream

            do {
              int count = read(buf, n, length - n);
              if (count < 0) throw new EOFException();
              n += count;
            } while (n < length);
            ois = new ObjectInputStream(new GZIPInputStream(new ByteArrayInputStream(buf)));
          } else {
            ois = new ObjectInputStream(this);
          }
         
          if (getLogger().isLoggable(BasicLevel.DEBUG))
    View Full Code Here

    Examples of java.io.ByteArrayInputStream

      public void react(AgentId from, Notification not) throws Exception {
        if (not instanceof AgentCreateRequest) {
          AgentCreateRequest cnot = (AgentCreateRequest) not;
          try {
            // Restore the new agent state.
            ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(cnot.agentState, 0,
                cnot.agentState.length));
            Agent ag = (Agent) ois.readObject();
            try {
              ois.close();
            } catch (IOException exc) {}
    View Full Code Here

    Examples of java.io.ByteArrayInputStream

                    RecordEnumeration re = rs.enumerateRecords(null, null, false);
                    if (this.cc != null && re.hasNextElement()) {
                        byte[] bSource = re.nextRecord();
                        re.destroy();
                        if (bSource != null) {
                            ByteArrayInputStream bais = new ByteArrayInputStream(bSource);
                            DataInputStream dis = new DataInputStream(bais);
                            int nSource = dis.readInt();
                            int nCapture = dis.readInt();
                            this.nCurrentHeight = dis.readInt();
                            this.nCurrentWidth = dis.readInt();
    View Full Code Here

    Examples of java.io.ByteArrayInputStream

            public Object objectFromByteBuffer(byte[] buf) throws Exception {
                if(buf == null)
                    return null;

                DataInputStream in=new DataInputStream(new ByteArrayInputStream(buf));
                byte type=in.readByte();
                if(type == NULL)
                    return null;
                if(type == METHOD_CALL) {
                    short id=in.readShort();
    View Full Code Here

    Examples of java.io.ByteArrayInputStream

       * @see fr.dyade.aaa.util.Transaction#load(java.lang.String, java.lang.String)
       */
      public final Object load(String dirName, String name) throws IOException, ClassNotFoundException {
        byte[] buf = loadByteArray(dirName, name);
        if (buf != null) {
          ByteArrayInputStream bis = new ByteArrayInputStream(buf);
          ObjectInputStream ois = new ObjectInputStream(bis);
          try {
            return ois.readObject();
          } finally {
            ois.close();
            bis.close();
          }
        }
       
        return null;
      }
    View Full Code Here

    Examples of java.io.ByteArrayInputStream

      }
     
      public final Object load(String dirName, String name) throws IOException, ClassNotFoundException {
        byte[] buf = loadByteArray(dirName, name);
        if (buf != null) {
          ByteArrayInputStream bis = new ByteArrayInputStream(buf);
          ObjectInputStream ois = new ObjectInputStream(bis);
          try {
            return ois.readObject();
          } finally {
            ois.close();
            bis.close();
          }
        }
       
        return null;
      }
    View Full Code Here

    Examples of java.io.ByteArrayInputStream

                        true);
                try {
                    byte[] bSource = rs.getRecord(this.nIdSource);
                    this.szCurrentSource = new String(bSource);
                    bSource = rs.getRecord(this.nIdSettings);
                    ByteArrayInputStream bais = new ByteArrayInputStream(bSource);
                    DataInputStream dis = new DataInputStream(bais);
                    dis = null;
                    bais = null;
                    rs.closeRecordStore();
                } catch (Exception ex) {
    View Full Code Here

    Examples of java.io.ByteArrayInputStream

        if (! enabled) {
          return input;
        }

        // okay, parse the HTML code
        ByteArrayInputStream bis = new ByteArrayInputStream(input.getContent());
        Tidy tidy = new Tidy();
        tidy.setUpperCaseTags(false);
        tidy.setUpperCaseAttrs(false);
        tidy.setErrout(new PrintWriter(new NullWriter()));
    View Full Code Here

    Examples of java.io.ByteArrayInputStream

                java.security.cert.CertificateFactory cf=java.security.cert.CertificateFactory.getInstance("X.509");
                for (int i=0; i<length; i++)
                {
                    byte bytes[]=javaxCerts[i].getEncoded();
                    ByteArrayInputStream stream=new ByteArrayInputStream(bytes);
                    javaCerts[i]=(X509Certificate)cf.generateCertificate(stream);
                }

                return javaCerts;
            }
    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.