Package com.e1c.g5.v8.fastzip
Class FzipIoTest.MultiReadEntryRegistry
java.lang.Object
com.e1c.g5.v8.fastzip.FzipIoTest.MultiReadEntryRegistry
- All Implemented Interfaces:
IFzipEntryRegistry
- Enclosing class:
- FzipIoTest
-
Field Summary
Fields inherited from interface com.e1c.g5.v8.fastzip.entry.IFzipEntryRegistry
MAX_ENTRY_DESCRIPTOR_LENGTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionreadEntryDescriptor(Supplier<DataInput> inputSupplier) Deserializes entry fromDataInput.voidwriteEntryDescriptor(IFzipEntry entry, DataOutput out) Serializes an entry toDataOutput.
-
Constructor Details
-
MultiReadEntryRegistry
-
-
Method Details
-
writeEntryDescriptor
Description copied from interface:IFzipEntryRegistrySerializes an entry toDataOutput.The behaviour is unspecified if more than
IFzipEntryRegistry.MAX_ENTRY_DESCRIPTOR_LENGTHbytes were written to the output.- Specified by:
writeEntryDescriptorin interfaceIFzipEntryRegistry- Parameters:
entry- the entry, nevernullout- the output, nevernull- Throws:
IOException- if an IO error occurs
-
readEntryDescriptor
Description copied from interface:IFzipEntryRegistryDeserializes entry fromDataInput.The input is provided by a supplier. The supplier may be invoked multiple times. Each invocation will yield an input with the same data.
The number of bytes read from the last supplied input must be equal to the number of bytes written on serialization. Otherwise the behaviour is unspecified.
The behaviour is unspecified if more than
IFzipEntryRegistry.MAX_ENTRY_DESCRIPTOR_LENGTHbytes were read from the input.- Specified by:
readEntryDescriptorin interfaceIFzipEntryRegistry- Parameters:
inputSupplier- the input supplier, nevernull- Returns:
- the deserialized entry, cannot be
null - Throws:
IOException- if an IO error occurs or the entry cannot be deserialized
-