Package org.apache.tika.io

Examples of org.apache.tika.io.TikaInputStream.reset()


                if (tis.hasFile()) {
                    Font.createFont(Font.TRUETYPE_FONT, tis.getFile());
                } else {
                    tis.mark(0);
                    Font.createFont(Font.TRUETYPE_FONT, stream);
                    tis.reset();
                }
            } catch (FontFormatException ex) {
                throw new TikaException("Bad TrueType font.");
            }
        }
View Full Code Here


       
        if (embeddedExtractor.shouldParseEmbedded(metadata)) {
            TikaInputStream stream = TikaInputStream.get(bytes);
            if (metadata.get(Metadata.RESOURCE_NAME_KEY) == null) {
                String extension = getExtension(stream, metadata);
                stream.reset();
                if (inObject && state == EMB_STATE.PICT) {
                    metadata.set(Metadata.RESOURCE_NAME_KEY, "thumbnail_"+thumbCount++ + extension);
                    metadata.set(RTFMetadata.THUMBNAIL, "true");
                } else {
                    metadata.set(Metadata.RESOURCE_NAME_KEY, "file_"+unknownFilenameCount.getAndIncrement() +
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.