APIdia Launch Partner
Top Description Inners Fields Constructors Methods
io.github.spannm.jackcess.impl

public Class CompoundOleUtil

extends Object
implements CompoundPackageFactory
Class Inheritance
All Implemented Interfaces
io.github.spannm.jackcess.impl.OleUtil.CompoundPackageFactory
Imports
io.github.spannm.jackcess.impl.OleUtil.CompoundPackageFactory, .OleUtil.ContentImpl, .OleUtil.EmbeddedPackageContentImpl, .OleUtil.OleBlobImpl, io.github.spannm.jackcess.util.MemFileChannel, .OleBlob.CompoundContent, .OleBlob.ContentType, .ToStringBuilder, org.apache.poi.poifs.filesystem.DirectoryEntry, .DocumentEntry, .DocumentInputStream, .POIFSFileSystem, java.io.FileNotFoundException, .IOException, .InputStream, .OutputStream, .UncheckedIOException, .UnsupportedEncodingException, java.net.URLDecoder, .URLEncoder, java.nio.ByteBuffer, java.nio.charset.Charset, .StandardCharsets, java.util.ArrayList, .Iterator, .List

Utility code for working with OLE data which is in the compound storage format. This functionality relies on the optional POI library.

Note that all POI usage is restricted to this file so that the basic ole support in OleUtil can be utilized without requiring POI.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private static final String
private static final Charset
private static final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public OleUtil.ContentImpl
createCompoundPackageContent(OleUtil.OleBlobImpl blob, String prettyName, String className, String typeName, ByteBuffer blobBb, int dataBlockLen)

Implements io.github.spannm.jackcess.impl.OleUtil.CompoundPackageFactory.createCompoundPackageContent.

Creates a nes CompoundContent for the given blob information.

private static String
public static DocumentEntry

Returns:

the relevant DocumentEntry
getDocumentEntry
(String
fully qualified, encoded entry name
entryName
,
DirectoryEntry
root directory of the compound storage
dir
)

Gets a DocumentEntry from compound storage based on a fully qualified, encoded entry name.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CONTENTS_ENTRYback to summary
private static final String CONTENTS_ENTRY
ENTRY_NAME_CHARSETback to summary
private static final Charset ENTRY_NAME_CHARSET
ENTRY_SEPARATORback to summary
private static final String ENTRY_SEPARATOR

Constructor Detail

CompoundOleUtilback to summary
public CompoundOleUtil()

Method Detail

createCompoundPackageContentback to summary
public OleUtil.ContentImpl createCompoundPackageContent(OleUtil.OleBlobImpl blob, String prettyName, String className, String typeName, ByteBuffer blobBb, int dataBlockLen)

Implements io.github.spannm.jackcess.impl.OleUtil.CompoundPackageFactory.createCompoundPackageContent.

Creates a nes CompoundContent for the given blob information.

Annotations
@Override
decodeEntryNameback to summary
private static String decodeEntryName(String name)
Annotations
@SuppressWarnings:JdkObsolete
getDocumentEntryback to summary
public static DocumentEntry getDocumentEntry(String entryName, DirectoryEntry dir) throws IOException

Gets a DocumentEntry from compound storage based on a fully qualified, encoded entry name.

Parameters
entryName:String

fully qualified, encoded entry name

dir:DirectoryEntry

root directory of the compound storage

Returns:DocumentEntry

the relevant DocumentEntry

Exceptions
IOException:
if some other io error occurs
FileNotFoundException:
if the entry does not exist
io.github.spannm.jackcess.impl back to summary

private final Class CompoundOleUtil.CompoundContentImpl

extends EmbeddedPackageContentImpl
implements CompoundContent
Class Inheritance
All Implemented Interfaces
io.github.spannm.jackcess.util.OleBlob.CompoundContent, java.lang.Iterable, io.github.spannm.jackcess.util.OleBlob.EmbeddedContent, io.github.spannm.jackcess.util.OleBlob.Content, io.github.spannm.jackcess.util.OleBlob.PackageContent

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private POIFSFileSystem

Constructor Summary

AccessConstructor and Description
private
CompoundContentImpl(OleUtil.OleBlobImpl blob, String prettyName, String className, String typeName, int position, int length)

Method Summary

Modifier and TypeMethod and Description
public void
close()

Overrides io.github.spannm.jackcess.impl.OleUtil.ContentImpl.close.

Implements java.io.Closeable.close.

Closes this stream and releases any system resources associated with it.

private static String
public CompoundOleUtil.CompoundContentImpl.EntryImpl
private List<OleBlob.CompoundContent.Entry>
public CompoundOleUtil.CompoundContentImpl.EntryImpl
private POIFSFileSystem
public OleBlob.ContentType
getType()

Implements io.github.spannm.jackcess.util.OleBlob.Content.getType.

Returns the type of this content.

public boolean
public Iterator<OleBlob.CompoundContent.Entry>
iterator()

Implements java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from io.github.spannm.jackcess.impl.OleUtil.EmbeddedPackageContentImpl:
getClassNamegetPrettyNamegetTypeNametoString

Field Detail

fsback to summary
private POIFSFileSystem fs

Constructor Detail

CompoundContentImplback to summary
private CompoundContentImpl(OleUtil.OleBlobImpl blob, String prettyName, String className, String typeName, int position, int length)

Method Detail

closeback to summary
public void close()

Overrides io.github.spannm.jackcess.impl.OleUtil.ContentImpl.close.

Implements java.io.Closeable.close.

Doc from java.io.Closeable.close.

Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect.

As noted in AutoCloseable#close(), cases where the close may fail require careful attention. It is strongly advised to relinquish the underlying resources and to internally mark the Closeable as closed, prior to throwing the IOException.

Annotations
@Override
encodeEntryNameback to summary
private static String encodeEntryName(String name)
Annotations
@SuppressWarnings:JdkObsolete
getContentsEntryback to summary
public CompoundOleUtil.CompoundContentImpl.EntryImpl getContentsEntry() throws IOException

Implements io.github.spannm.jackcess.util.OleBlob.CompoundContent.getContentsEntry.

Annotations
@Override
getEntriesback to summary
private List<OleBlob.CompoundContent.Entry> getEntries(List<OleBlob.CompoundContent.Entry> entries, DirectoryEntry dir, String prefix)
getEntryback to summary
public CompoundOleUtil.CompoundContentImpl.EntryImpl getEntry(String entryName) throws IOException

Implements io.github.spannm.jackcess.util.OleBlob.CompoundContent.getEntry.

Annotations
@Override
getFileSystemback to summary
private POIFSFileSystem getFileSystem() throws IOException
getTypeback to summary
public OleBlob.ContentType getType()

Implements io.github.spannm.jackcess.util.OleBlob.Content.getType.

Doc from io.github.spannm.jackcess.util.OleBlob.Content.getType.

Returns the type of this content.

Annotations
@Override
hasContentsEntryback to summary
public boolean hasContentsEntry() throws IOException

Implements io.github.spannm.jackcess.util.OleBlob.CompoundContent.hasContentsEntry.

Annotations
@Override
iteratorback to summary
public Iterator<OleBlob.CompoundContent.Entry> iterator()

Implements java.lang.Iterable.iterator.

Doc from java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
io.github.spannm.jackcess.impl back to summary

private final Class CompoundOleUtil.CompoundContentImpl.EntryImpl

extends Object
implements Entry
Class Inheritance
  • java.lang.Object
  • io.github.spannm.jackcess.impl.CompoundOleUtil.CompoundContentImpl.EntryImpl
All Implemented Interfaces
io.github.spannm.jackcess.util.OleBlob.CompoundContent.Entry, io.github.spannm.jackcess.util.OleBlob.EmbeddedContent, io.github.spannm.jackcess.util.OleBlob.Content

Field Summary

Modifier and TypeField and Description
private final DocumentEntry
private final String

Constructor Summary

AccessConstructor and Description
private
EntryImpl(String _name, DocumentEntry _docEntry)

Field Detail

mdocEntryback to summary
private final DocumentEntry mdocEntry
mnameback to summary
private final String mname

Constructor Detail

EntryImplback to summary
private EntryImpl(String _name, DocumentEntry _docEntry)

Method Detail

getBlobback to summary
public OleUtil.OleBlobImpl getBlob()

Implements io.github.spannm.jackcess.util.OleBlob.Content.getBlob.

Doc from io.github.spannm.jackcess.util.OleBlob.Content.getBlob.

Returns the blob which owns this content.

Annotations
@Override
getNameback to summary
public String getName()

Implements io.github.spannm.jackcess.util.OleBlob.CompoundContent.Entry.getName.

Annotations
@Override
getParentback to summary
public CompoundOleUtil.CompoundContentImpl getParent()

Implements io.github.spannm.jackcess.util.OleBlob.CompoundContent.Entry.getParent.

Doc from io.github.spannm.jackcess.util.OleBlob.CompoundContent.Entry.getParent.

Returns the CompoundContent which owns this entry.

Annotations
@Override
getStreamback to summary
public InputStream getStream() throws IOException

Implements io.github.spannm.jackcess.util.OleBlob.EmbeddedContent.getStream.

Annotations
@Override
getTypeback to summary
public OleBlob.ContentType getType()

Implements io.github.spannm.jackcess.util.OleBlob.Content.getType.

Doc from io.github.spannm.jackcess.util.OleBlob.Content.getType.

Returns the type of this content.

Annotations
@Override
lengthback to summary
public long length()

Implements io.github.spannm.jackcess.util.OleBlob.EmbeddedContent.length.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
writeToback to summary
public void writeTo(OutputStream out) throws IOException

Implements io.github.spannm.jackcess.util.OleBlob.EmbeddedContent.writeTo.

Annotations
@Override