Package java.io

Examples of java.io.SequenceInputStream


            }
        } while (true);
    }

    public ImageRawPNG getImageRawPNG(ImageInfo info) throws ImageException {
        InputStream seqStream = new SequenceInputStream(Collections.enumeration(streamVec));
        switch (colorType) {
        case PNG_COLOR_GRAY:
            if (hasPalette) {
                throw new ImageException("Corrupt PNG: color palette is not allowed!");
            }
View Full Code Here


            encodeParam.setCompressedText(ztextArray);
        }

        // Parse prior IDAT chunks
        InputStream seqStream =
            new SequenceInputStream( Collections.enumeration( streamVec ));
        InputStream infStream =
            new InflaterInputStream(seqStream, new Inflater());
        dataStream = new DataInputStream(infStream);

        // Create an empty WritableRaster
        int depth = bitDepth;
        if ((colorType == PNG_COLOR_GRAY) &&
            (bitDepth < 8) && output8BitGray) {
            depth = 8;
        }
        if ((colorType == PNG_COLOR_PALETTE) && expandPalette) {
            depth = 8;
        }
        int width  = bounds.width;
        int height = bounds.height;

        int bytesPerRow = (outputBands*width*depth + 7)/8;
        int scanlineStride =
            (depth == 16) ? (bytesPerRow/2) : bytesPerRow;

        theTile = createRaster(width, height, outputBands,
                               scanlineStride,
                               depth);

        if (performGammaCorrection && (gammaLut == null)) {
            initGammaLut(bitDepth);
        }
        if ((postProcess == POST_GRAY_LUT) ||
            (postProcess == POST_GRAY_LUT_ADD_TRANS) ||
            (postProcess == POST_GRAY_LUT_ADD_TRANS_EXP)) {
            initGrayLut(bitDepth);
        }

        decodeImage(interlaceMethod == 1);

        // Free resources associated with compressed data.
        dataStream.close();
        infStream.close();
        seqStream.close();
        streamVec = null;

        SampleModel sm = theTile.getSampleModel();
        ColorModel  cm;

View Full Code Here

            encodeParam.setCompressedText(ztextArray);
        }

        // Parse prior IDAT chunks
        InputStream seqStream =
            new SequenceInputStream(Collections.enumeration(streamVec));
        InputStream infStream =
            new InflaterInputStream(seqStream, new Inflater());
        dataStream = new DataInputStream(infStream);

        // Create an empty WritableRaster
View Full Code Here

         if (stream_handler != null)
            stream_handler.markForClose(this);

         if (Version.equals("HTTP/0.9"))
         {
            inp_stream = new SequenceInputStream(new ByteArrayInputStream(Data), inp_stream);
            Data = null;
         }
      }

      if (cd_type == CD_CONTLEN)
View Full Code Here

        }
      } catch (InterruptedException e){//Will probably never be called, but just in case...
        Thread.currentThread().interrupt();//Interrupts the thread since something went wrong.
      }
    }
    return new SequenceInputStream(Collections.enumeration(inputStreams));//Sequences the stream.
  }
View Full Code Here

        }
      } catch (InterruptedException e){//Will probably never be called, but just in case...
        Thread.currentThread().interrupt();//Interrupts the thread since something went wrong.
      }
    }
    return new SequenceInputStream(Collections.enumeration(inputStreams));//Sequences the stream.
  }
View Full Code Here

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

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

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

            if (resourceStream != null) {
                compositionStreams.add(resourceStream);
            }
        }
        if (!compositionStreams.isEmpty()) {
            return new SequenceInputStream(compositionStreams.elements());
        }
        if (LOG.isDebugEnabled()) {
            LOG.debug("could not load resource path '" + resourcePath + "' from " + getName());
        }
        return null;
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.