com.twelvemonkeys.imageio.metadata.xmp
Class XMPScanner
java.lang.Object
com.twelvemonkeys.imageio.metadata.xmp.XMPScanner
public final class XMPScanner
- extends Object
XMPScanner
- Version:
- $Id: XMPScanner.java,v 1.0 Nov 11, 2009 4:49:00 PM haraldk Exp$
- Author:
- Harald Kuhr, last modified by $Author: haraldk$
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XMPScanner
public XMPScanner()
scanForXMPPacket
public static Reader scanForXMPPacket(Object pInput)
throws IOException
- Scans the given input for an XML metadata packet.
The scanning process involves reading every byte in the file, while searching for an XMP packet.
This process is very inefficient, compared to reading a known file format.
NOTE: The XMP Specification says this method of reading an XMP packet
should be considered a last resort.
This is because files may contain multiple XMP packets, some which may be related to embedded resources,
some which may be obsolete (or even incomplete).
- Parameters:
pInput - the input to scan. The input may be an ImageInputStream or
any object that can be passed to ImageIO.createImageInputStream(Object).
Typically this may be a File, InputStream or RandomAccessFile.
- Returns:
- a character Reader
- Throws:
UnsupportedCharsetException - if the encoding specified within the BOM is not supported
by the JRE.
IOException - if an I/O exception occurs reading from pInput.- See Also:
ImageIO.createImageInputStream(Object)
main
public static void main(String[] pArgs)
throws IOException
- Throws:
IOException
Copyright © 2015. All Rights Reserved.