Package org.apache.poi.ss.extractor
Class EmbeddedExtractor
- java.lang.Object
-
- org.apache.poi.ss.extractor.EmbeddedExtractor
-
- All Implemented Interfaces:
Iterable<EmbeddedExtractor>
- Direct Known Subclasses:
EmbeddedExtractor.Ole10Extractor
@Beta public class EmbeddedExtractor extends Object implements Iterable<EmbeddedExtractor>
This extractor class tries to identify various embedded documents within Excel files and provide them via a common interface, i.e. the EmbeddedData instances
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EmbeddedExtractor.Ole10Extractor
-
Constructor Summary
Constructors Constructor Description EmbeddedExtractor()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canExtract(DirectoryNode source)
boolean
canExtract(Picture source)
protected static void
copyNodes(DirectoryNode src, DirectoryNode dest)
protected EmbeddedData
extract(DirectoryNode dn)
protected EmbeddedData
extract(Picture source)
protected void
extractAll(ShapeContainer<?> parent, List<EmbeddedData> embeddings)
List<EmbeddedData>
extractAll(Sheet sheet)
EmbeddedData
extractOne(DirectoryNode src)
EmbeddedData
extractOne(Picture src)
static int
getMaxRecordLength()
Iterator<EmbeddedExtractor>
iterator()
static void
setMaxRecordLength(int length)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
setMaxRecordLength
public static void setMaxRecordLength(int length)
- Parameters:
length
- the max record length allowed for EmbeddedExtractor
-
getMaxRecordLength
public static int getMaxRecordLength()
- Returns:
- the max record length allowed for EmbeddedExtractor
-
iterator
public Iterator<EmbeddedExtractor> iterator()
- Specified by:
iterator
in interfaceIterable<EmbeddedExtractor>
- Returns:
- the list of known extractors, if you provide custom extractors, override this method
-
extractOne
public EmbeddedData extractOne(DirectoryNode src) throws IOException
- Throws:
IOException
-
extractOne
public EmbeddedData extractOne(Picture src) throws IOException
- Throws:
IOException
-
extractAll
public List<EmbeddedData> extractAll(Sheet sheet) throws IOException
- Throws:
IOException
-
extractAll
protected void extractAll(ShapeContainer<?> parent, List<EmbeddedData> embeddings) throws IOException
- Throws:
IOException
-
canExtract
public boolean canExtract(DirectoryNode source)
-
canExtract
public boolean canExtract(Picture source)
-
extract
protected EmbeddedData extract(DirectoryNode dn) throws IOException
- Throws:
IOException
-
extract
protected EmbeddedData extract(Picture source) throws IOException
- Throws:
IOException
-
copyNodes
protected static void copyNodes(DirectoryNode src, DirectoryNode dest) throws IOException
- Throws:
IOException
-
-