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
.void
writeEntryDescriptor
(IFzipEntry entry, DataOutput out) Serializes an entry toDataOutput
.
-
Constructor Details
-
MultiReadEntryRegistry
-
-
Method Details
-
writeEntryDescriptor
Description copied from interface:IFzipEntryRegistry
Serializes an entry toDataOutput
.The behaviour is unspecified if more than
IFzipEntryRegistry.MAX_ENTRY_DESCRIPTOR_LENGTH
bytes were written to the output.- Specified by:
writeEntryDescriptor
in interfaceIFzipEntryRegistry
- Parameters:
entry
- the entry, nevernull
out
- the output, nevernull
- Throws:
IOException
- if an IO error occurs
-
readEntryDescriptor
Description copied from interface:IFzipEntryRegistry
Deserializes 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_LENGTH
bytes were read from the input.- Specified by:
readEntryDescriptor
in 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
-