Package java.io

Examples of java.io.PushbackInputStream


              
            case '\r':
               int c2 = in.read();
               if ((c2 != '\n') && (c2 != -1)) {
                  if (!(in instanceof PushbackInputStream)) {
                     in = new PushbackInputStream(in);
                  }
                  ((PushbackInputStream)in).unread(c2);
               } else {
                  done = true;
                  break;
View Full Code Here


                    sDataObjectCount = 0;
                    return null;
                }
            }

            PushbackInputStream pis = new PushbackInputStream(in);
            int tag = pis.read();

            if (tag == -1)
            {
                return null;
            }

            pis.unread(tag);

            if (tag != 0x30// assume ascii PEM encoded.
            {
                return readPEMCertificate(pis);
            }
View Full Code Here

                    sCrlDataObjectCount = 0;
                    return null;
                }
            }

            PushbackInputStream pis = new PushbackInputStream(inStream);
            int tag = pis.read();

            if (tag == -1)
            {
                return null;
            }

            pis.unread(tag);

            if (tag != 0x30// assume ascii PEM encoded.
            {
                return readPEMCRL(pis);
            }
View Full Code Here

   
    private int theA;
    private int theB;
   
    public JSMin(InputStream in, OutputStream out) {
        this.in = new PushbackInputStream(in);
        this.out = out;
    }
View Full Code Here

        private PushbackInputStream delegate;
       
        public ValueExpressionFilterInputStream(InputStream in)
        {
            super();
            delegate = new PushbackInputStream(in,255);
        }
View Full Code Here

            socket.setTcpNoDelay(soNodelay);
            socket.setSoTimeout(soTimeout);
            if (sendBufferSize != -1) {
                socket.setSendBufferSize(sendBufferSize);
            }
            inputStream = new PushbackInputStream(socket.getInputStream());
            outputStream = new BufferedOutputStream(
                new WrappedOutputStream(socket.getOutputStream()),
                socket.getSendBufferSize()
            );
            isOpen = true;
View Full Code Here

        socket = socketFactory.createSocket(socket, hostName, portNumber, true);
        if (sendBufferSize != -1) {
            socket.setSendBufferSize(sendBufferSize);
        }       
        inputStream = new PushbackInputStream(socket.getInputStream());
        outputStream = new BufferedOutputStream(
            new WrappedOutputStream(socket.getOutputStream()),
            socket.getSendBufferSize()
        );
        usingSecureSocket = true;
View Full Code Here

    private static InputStream getNonEmptyContent(
        HttpURLConnection connection
    ) {
        InputStream in = null;
        try {
            PushbackInputStream pin =
                new PushbackInputStream(connection.getInputStream());
            int c = pin.read();
            if (c != -1) {
                pin.unread((byte)c);
                in = pin;
            }
        } catch (IOException ioe) {
            // ignore
        }   
View Full Code Here

    private static InputStream getNonEmptyContent(
        HttpURLConnection connection
    ) {
        InputStream in = null;
        try {
            PushbackInputStream pin =
                new PushbackInputStream(connection.getInputStream());
            int c = pin.read();
            if (c != -1) {
                pin.unread((byte)c);
                in = pin;
            }
        } catch (IOException ioe) {
            // ignore
        }   
View Full Code Here

    * @param defaultEnc default encoding if stream does not have
    *                   BOM marker. Give NULL to use system-level default.
    */
   public UnicodeReader(InputStream in, String defaultEnc) {
    super(in);
      internalIn = new PushbackInputStream(in, BOM_SIZE);
      this.defaultEnc = defaultEnc;
   }
View Full Code Here

TOP

Related Classes of java.io.PushbackInputStream

Copyright © 2018 www.massapicom. 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.