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

            bos.close();

            // Get the bytes of the serialized object
            final byte[] b1 = bos.toByteArray();

            ByteArrayInputStream bais = new ByteArrayInputStream( b1 );
            StatefulSession session2 = ruleBase.newStatefulSession( bais );
            bais.close();

            bos = new ByteArrayOutputStream();
            out = new ObjectOutputStream( bos );
            out.writeObject( session2 );
            out.close();
    View Full Code Here

    Examples of java.io.ByteArrayInputStream

            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();
    View Full Code Here

    Examples of java.io.ByteArrayInputStream

            byte[] b1 = baos.toByteArray();
            session.halt();
            session.dispose();
            Thread.sleep(400);
           
            ByteArrayInputStream bais = new ByteArrayInputStream( b1 );       
            final StatefulSession session2 = ( StatefulSession ) (( StatefulKnowledgeSessionImpl) marshaller.unmarshall( bais ) ).session;
           
        new Thread(new Runnable() {
          public void run() {
                session2.fireUntilHalt();        
    View Full Code Here

    Examples of java.io.ByteArrayInputStream

                // convert to byte array
                byte[] result1 = out.toByteArray();
       
                // put this
                String filename = generateRandomFilename();
                ftp.put(new ByteArrayInputStream(result1), filename);
       
                // get it back
                byte[] result2 = ftp.get(filename);
       
                // delete remote file
    View Full Code Here

    Examples of java.io.ByteArrayInputStream

        }

        void button1_action(ActionEvent evt) {
            String expr = textArea1.getText();
            XQueryParser parser = new XQueryParser(
                    new ByteArrayInputStream(expr.getBytes()));
            parser.disable_tracing();

            PrintVisitor dumper;
            try {
                XQueryModule module = parser.parse();
    View Full Code Here

    Examples of java.io.ByteArrayInputStream

            FTPTransferType currentTransferType = chooseTransferMode(remoteFile);
           
            String result = null;      
            try {

                ByteArrayInputStream input = null;
                if (retryCount == 0 || append) {
                    input = new ByteArrayInputStream(bytes);
                    result = putStream(input, remoteFile, append);
                } else {
                    for (int attempt = 1;; attempt++) {
                        try {
                            if (attempt > 1
                                    && getType().equals(FTPTransferType.BINARY))
                                resume();
                            log.debug("Attempt #" + attempt);
                            input = new ByteArrayInputStream(bytes);
                            result = putStream(input, remoteFile, append);
                            break;
                        } catch (ControlChannelIOException ex) {
                            if (!processControlChannelException(cwd, ex, attempt))
                                throw ex;
    View Full Code Here

    Examples of java.io.ByteArrayInputStream

            return put(bytes, remoteFile, false);
        }

        public String put(byte[] bytes, String remoteFile, boolean append)
                throws IOException, FTPException {
            ByteArrayInputStream str = new ByteArrayInputStream(bytes);
            return put(str, remoteFile, append);
        }
    View Full Code Here

    Examples of java.io.ByteArrayInputStream

                    }
       
                    if (arg instanceof InputStream) {
                        in = (InputStream) arg;
                    } else if (arg instanceof byte[]) {
                        in = new ByteArrayInputStream((byte[]) arg);
                    } else if (arg instanceof MimePart) {
                        in = new ByteArrayInputStream(((MimePart) arg).getContent());
                    } else if (arg instanceof File) {
                        in = new FileInputStream((File) arg);
                    } else if (arg instanceof FileObject) {
                        in = new FileInputStream(((FileObject)arg).getFile());
                    } else if (arg instanceof String) {
    View Full Code Here

    Examples of java.io.ByteArrayInputStream

       
        /**
         * {@inheritDoc} Returns the adapted WSDL.
         */
        public InputStream getWSDL(HttpServletRequest req) throws IOException, WsException {
            return new ByteArrayInputStream(getAdaptedWsdl(req));
        }
    View Full Code Here

    Examples of java.io.ByteArrayInputStream

        public void writeWSDL(OutputStream outputStream, HttpServletRequest req) throws IOException {
            outputStream.write(wsdlBytes);
        }

        public InputStream getWSDL(HttpServletRequest req) throws IOException {
            return new ByteArrayInputStream(wsdlBytes);
        }
    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.