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
public static class FzipIoTest.MultiReadEntryRegistry extends Object implements IFzipEntryRegistry
-
-
Field Summary
-
Fields inherited from interface com.e1c.g5.v8.fastzip.entry.IFzipEntryRegistry
MAX_ENTRY_DESCRIPTOR_LENGTH
-
-
Constructor Summary
Constructors Constructor Description MultiReadEntryRegistry(byte[] bytes, IFzipEntry entry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IFzipEntryreadEntryDescriptor(Supplier<DataInput> inputSupplier)Deserializes entry fromDataInput.voidwriteEntryDescriptor(IFzipEntry entry, DataOutput out)Serializes an entry toDataOutput.
-
-
-
Constructor Detail
-
MultiReadEntryRegistry
public MultiReadEntryRegistry(byte[] bytes, IFzipEntry entry)
-
-
Method Detail
-
writeEntryDescriptor
public void writeEntryDescriptor(IFzipEntry entry, DataOutput out) throws IOException
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
public IFzipEntry readEntryDescriptor(Supplier<DataInput> inputSupplier) throws IOException
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
-
-