Class StreamObject
- java.lang.Object
- 
- org.apache.tika.parser.microsoft.onenote.fsshttpb.streamobj.StreamObject
 
- 
- All Implemented Interfaces:
- IFSSHTTPBSerializable
 - Direct Known Subclasses:
- CellManifestCurrentRevision,- DataElement,- DataElementHash,- DataElementPackage,- DataHashObject,- DataSizeObject,- NodeObject,- ObjectGroupData,- ObjectGroupDeclarations,- ObjectGroupMetadata,- ObjectGroupMetadataDeclarations,- ObjectGroupObjectBLOBDataDeclaration,- ObjectGroupObjectData,- ObjectGroupObjectDataBLOBReference,- ObjectGroupObjectDeclare,- RevisionManifest,- RevisionManifestObjectGroupReferences,- RevisionManifestRootDeclare,- SignatureObject,- StorageIndexCellMapping,- StorageIndexManifestMapping,- StorageIndexRevisionMapping,- StorageManifestRootDeclare,- StorageManifestSchemaGUID
 
 public abstract class StreamObject extends Object implements IFSSHTTPBSerializable 
- 
- 
Constructor SummaryConstructors Modifier Constructor Description protectedStreamObject(StreamObjectTypeHeaderStart streamObjectType)Initializes a new instance of the StreamObject class.
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description intdeserializeFromByteArray(StreamObjectHeaderStart header, byte[] byteArray, int startIndex)Used to return the length of this element.protected abstract voiddeserializeItemsFromByteArray(byte[] byteArray, AtomicInteger currentIndex, int lengthOfItems)De-serialize items from byte array.static Set<StreamObjectTypeHeaderStart>getCompoundTypes()Gets the StreamObjectTypeHeaderStartstatic <T extends StreamObject>
 TgetCurrent(byte[] byteArray, AtomicInteger index, Class<T> clazz)Get current stream object.static Map<StreamObjectTypeHeaderStart,Class>getStreamObjectTypeMapping()Gets the StreamObjectTypeMappingstatic StreamObjectparseStreamObject(StreamObjectHeaderStart header, byte[] byteArray, AtomicInteger index)Parse stream object from byte array.protected abstract intserializeItemsToByteList(List<Byte> byteList)Serialize items to byte list.List<Byte>serializeToByteList()Serialize item to byte list.static <T extends StreamObject>
 booleantryGetCurrent(byte[] byteArray, AtomicInteger index, AtomicReference<T> streamObject, Class<T> clazz)Try to get current object, true will returned if success.
 
- 
- 
- 
Constructor Detail- 
StreamObjectprotected StreamObject(StreamObjectTypeHeaderStart streamObjectType) Initializes a new instance of the StreamObject class.- Parameters:
- streamObjectType- The instance of StreamObjectTypeHeaderStart.
 
 
- 
 - 
Method Detail- 
getCompoundTypespublic static Set<StreamObjectTypeHeaderStart> getCompoundTypes() Gets the StreamObjectTypeHeaderStart
 - 
getStreamObjectTypeMappingpublic static Map<StreamObjectTypeHeaderStart,Class> getStreamObjectTypeMapping() Gets the StreamObjectTypeMapping
 - 
getCurrentpublic static <T extends StreamObject> T getCurrent(byte[] byteArray, AtomicInteger index, Class<T> clazz) throws TikaException, IOException Get current stream object.- Parameters:
- byteArray- The byte array which contains message.
- index- The position where to start.
- Returns:
- The current object instance.
- Throws:
- TikaException
- IOException
 
 - 
parseStreamObjectpublic static StreamObject parseStreamObject(StreamObjectHeaderStart header, byte[] byteArray, AtomicInteger index) throws IOException, TikaException Parse stream object from byte array.- Parameters:
- header- The instance of StreamObjectHeaderStart.
- byteArray- The byte array.
- index- The position where to start.
- Returns:
- The instance of StreamObject.
- Throws:
- IOException
- TikaException
 
 - 
tryGetCurrentpublic static <T extends StreamObject> boolean tryGetCurrent(byte[] byteArray, AtomicInteger index, AtomicReference<T> streamObject, Class<T> clazz) throws TikaException, IOException Try to get current object, true will returned if success.- Parameters:
- byteArray- The byte array.
- index- The position where to start.
- streamObject- The instance that want to get.
- Returns:
- The result of whether get success.
- Throws:
- TikaException
- IOException
 
 - 
serializeToByteListpublic List<Byte> serializeToByteList() throws IOException, TikaException Serialize item to byte list.- Specified by:
- serializeToByteListin interface- IFSSHTTPBSerializable
- Returns:
- The byte list.
- Throws:
- IOException
- TikaException
 
 - 
deserializeFromByteArraypublic int deserializeFromByteArray(StreamObjectHeaderStart header, byte[] byteArray, int startIndex) throws IOException, TikaException Used to return the length of this element.- Parameters:
- header- Then instance of StreamObjectHeaderStart.
- byteArray- The byte list
- startIndex- The position where to start.
- Returns:
- The element length
- Throws:
- IOException
- TikaException
 
 - 
serializeItemsToByteListprotected abstract int serializeItemsToByteList(List<Byte> byteList) throws IOException, TikaException Serialize items to byte list.- Parameters:
- byteList- The byte list need to serialized.
- Returns:
- The length in bytes for additional data if the current stream object has, otherwise return 0.
- Throws:
- IOException
- TikaException
 
 - 
deserializeItemsFromByteArrayprotected abstract void deserializeItemsFromByteArray(byte[] byteArray, AtomicInteger currentIndex, int lengthOfItems) throws TikaException, IOExceptionDe-serialize items from byte array.- Parameters:
- byteArray- The byte array which contains response message.
- currentIndex- The index special where to start.
- lengthOfItems- The length of items.
- Throws:
- TikaException
- IOException
 
 
- 
 
-