Package java.io

Examples of java.io.SequenceInputStream


        {
            st = (COSStream) decodeP.getDictionaryObject(COSName.JBIG2_GLOBALS);
        }
        if(st != null)
        {
            reader.setInput(ImageIO.createImageInputStream(new SequenceInputStream(st.getFilteredStream(),compressedData)));
        }
        else
        {
            reader.setInput(ImageIO.createImageInputStream(compressedData));
        }
View Full Code Here


            //it is possible that two operators will get concatenated
            //together
            inputStreams.add( new ByteArrayInputStream( inbetweenStreamBytes ) );
        }

        return new SequenceInputStream( inputStreams.elements() );
    }
View Full Code Here

            remaining -= c;
            if (remaining == 0) {
                break;
            }
        }
        return new SequenceInputStream(Collections.enumeration(list));
    }
View Full Code Here

            encodeParam.setCompressedText(ztextArray);
        }

        // Parse prior IDAT chunks
        InputStream seqStream =
            new SequenceInputStream(streamVec.elements());
        InputStream infStream =
            new InflaterInputStream(seqStream, new Inflater());
        dataStream = new DataInputStream(infStream);
       
        // Create an empty WritableRaster
View Full Code Here

            encodeParam.setCompressedText(ztextArray);
        }

        // Parse prior IDAT chunks
        InputStream seqStream =
            new SequenceInputStream(streamVec.elements());
        InputStream infStream =
            new InflaterInputStream(seqStream, new Inflater());
        dataStream = new DataInputStream(infStream);
       
        // Create an empty WritableRaster
View Full Code Here

       * XXX:
       * This is a workaround for a corresponding bug in Java readers and writer,
       * see: http://developer.java.sun.com/developer/bugParade/bugs/4508058.html
       */
      if (info != null && info.fHasBOM && CHARSET_UTF_8.equals(encoding))
        stream= new SequenceInputStream(new ByteArrayInputStream(IContentDescription.BOM_UTF_8), stream);

      if (file.exists()) {

        if (info != null && !overwrite)
          checkSynchronizationState(info.fModificationStamp, file);
View Full Code Here

                public InputStream nextElement() {
                    return streams[index++];
               
               
            };
            return new SequenceInputStream(list);
        } else {
            return is;
        }
                
    }
View Full Code Here

          in.reset();
          parseWritable(in);
        } else {
          // We cannot use BufferedInputStream, it consumes more than we read from the underlying IS
          ByteArrayInputStream bais = new ByteArrayInputStream(pbuf);
          SequenceInputStream sis = new SequenceInputStream(bais, in); // Concatenate input streams
          // TODO: Am I leaking anything here wrapping the passed in stream?  We are not calling close on the wrapped
          // streams but they should be let go after we leave this context?  I see that we keep a reference to the
          // passed in inputstream but since we no longer have a reference to this after we leave, we should be ok.
          parseWritable(new DataInputStream(sis));
        }
View Full Code Here

        hri.readFields(in);
        return hri;
      } else {
        //we cannot use BufferedInputStream, it consumes more than we read from the underlying IS
        ByteArrayInputStream bais = new ByteArrayInputStream(pbuf);
        SequenceInputStream sis = new SequenceInputStream(bais, in); //concatenate input streams
        HRegionInfo hri = new HRegionInfo();
        hri.readFields(new DataInputStream(sis));
        return hri;
      }
    }
View Full Code Here

                public InputStream nextElement() {
                    return streams[index++];
               
               
            };
            return new SequenceInputStream(list);
        } else {
            return is;
        }
                
    }
View Full Code Here

TOP

Related Classes of java.io.SequenceInputStream

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.