Package com.drew.lang

Examples of com.drew.lang.StreamReader


    public static JpegSegmentData readSegments(@NotNull File file, @Nullable Iterable<JpegSegmentType> segmentTypes) throws JpegProcessingException, IOException
    {
        FileInputStream stream = null;
        try {
            stream = new FileInputStream(file);
            return readSegments(new StreamReader(stream), segmentTypes);
        } finally {
            if (stream != null) {
                stream.close();
            }
        }
View Full Code Here


            for (JpegSegmentType type : reader.getSegmentTypes()) {
                segmentTypes.add(type);
            }
        }

        JpegSegmentData segmentData = JpegSegmentReader.readSegments(new StreamReader(inputStream), segmentTypes);

        processJpegSegmentData(metadata, readers, segmentData);
    }
View Full Code Here

    @NotNull
    public static Metadata readMetadata(@NotNull InputStream inputStream)
    {
        Metadata metadata = new Metadata();
        new GifReader().extract(new StreamReader(inputStream), metadata);
        return metadata;
    }
View Full Code Here

    @NotNull
    public static Metadata readMetadata(@NotNull InputStream inputStream)
    {
        Metadata metadata = new Metadata();
        new BmpReader().extract(new StreamReader(inputStream), metadata);
        return metadata;
    }
View Full Code Here

    public static List<PngChunk> processFile(String filePath) throws PngProcessingException, IOException
    {
        FileInputStream inputStream = null;
        try {
            inputStream = new FileInputStream(filePath);
            return Iterables.toList(new PngChunkReader().extract(new StreamReader(inputStream), null));
        } finally {
            if (inputStream != null) {
                inputStream.close();
            }
        }
View Full Code Here

    @NotNull
    public static BmpHeaderDirectory processBytes(@NotNull String file) throws Exception
    {
        Metadata metadata = new Metadata();
        InputStream stream = new FileInputStream(file);
        new BmpReader().extract(new StreamReader(stream), metadata);
        stream.close();

        BmpHeaderDirectory directory = metadata.getDirectory(BmpHeaderDirectory.class);
        assertNotNull(directory);
        return directory;
View Full Code Here

    @NotNull
    public static GifHeaderDirectory processBytes(@NotNull String file) throws Exception
    {
        Metadata metadata = new Metadata();
        InputStream stream = new FileInputStream(file);
        new GifReader().extract(new StreamReader(stream), metadata);
        stream.close();

        GifHeaderDirectory directory = metadata.getDirectory(GifHeaderDirectory.class);
        assertNotNull(directory);
        return directory;
View Full Code Here

TOP

Related Classes of com.drew.lang.StreamReader

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.