Package java.io

Examples of java.io.PushbackInputStream


     *
     * @throws IOException If there is an error parsing the stream.
     */
    public CMap parse( InputStream input ) throws IOException
    {
        PushbackInputStream cmapStream = new PushbackInputStream( input );
        CMap result = new CMap();
        Object previousToken = null;
        Object token = null;
        while( (token = parseNextToken( cmapStream )) != null )
        {
View Full Code Here


    return cb.append("_").flip().toString()//$NON-NLS-1$
  }

    public static SQLXML jsonToXml(CommandContext context, final String rootName, final Blob json) throws TeiidComponentException, TeiidProcessingException, SQLException, IOException {
    InputStream is = json.getBinaryStream();
    PushbackInputStream pStream = new PushbackInputStream(is, 4);
    byte[] encoding = new byte[3];
    int read = pStream.read(encoding);
    pStream.unread(encoding, 0, read);
    Charset charset = UTF_8;
    if (read > 2) {
      if (encoding[0] == 0) {
        if (encoding[1] == 0) {
          charset = UTF_32BE;
View Full Code Here

   private int theB;

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

    private PushbackInputStream stream;
    private int chunkSize;
    private boolean closed;
   
    public ByteLobChunkStream(InputStream stream, int chunkSize) {
        this.stream = new PushbackInputStream(stream);
        this.chunkSize = chunkSize;
    }
View Full Code Here

    _documentHandler = documentHandler;
    _url = url;
   
    try {
   
      _inputStream = new PushbackInputStream(input);
      dispatchElements();
      _inputStream.close();
     
    } catch (IOException exception) {
   
View Full Code Here

            }

            if( TCP_NODELAY ) {
                socket.setTcpNoDelay( true );
            }
            in = new PushbackInputStream( socket.getInputStream(), PUSHBACK_BUF_SIZE );
            out = socket.getOutputStream();
            thread = new Thread( this, "JCIFS-SmbTransport" );
            thread.setDaemon( true );
            thread.start();
        }
View Full Code Here

    /**
     * Creates a new ZIP input stream.
     * @param in the actual input stream
     */
    public ZipInputStream(InputStream in) {
  super(new PushbackInputStream(in, 512), new Inflater(true), 512);
        usesDefaultInflater = true;
        if(in == null) {
            throw new NullPointerException("in is null");
        }
    }
View Full Code Here

     * Creates a new UnicodeSupportingInputStream
     *
     * @param in  inputstream to be read
     */
    public UnicodeSupportingInputStream(InputStream in) {
        internalIn = new PushbackInputStream(in, BOM_SIZE);
    }
View Full Code Here

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

     * Creates a new UnicodeSupportingInputStreamReader
     *
     * @param in  inputstream to be read
     */
    public UnicodeSupportingInputStreamReader(InputStream in) {
        internalIn = new PushbackInputStream(in, BOM_SIZE);
    }
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.