Package com.adobe.internal.io
Interface ByteWriterFactory
- All Known Implementing Classes:
SimpleByteWriterFactory
public interface ByteWriterFactory
Defines a factory for the construction of
ByteWriter
instances based on requested parameters.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classAn enumeration for the encryptioni status of data to placed in a requested instance.static classAn enumeration for the "fixedness" of a requested instance.static classAn enumeration for the anticipated longevity of a requested instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidcloseByteWriter(ByteWriter byteWriter) The caller has finished with the givenByteWriterand will no longer use it again.voidTheByteWriterFactoryis no longer needed and it should close down and free all resources allocated.getByteWriter(ByteWriterFactory.Longevity longevity, ByteWriterFactory.EncryptionStatus encryption, ByteWriterFactory.Fixed fixed, long[] size, boolean fast) Request an arrayByteWriterinstances with the given properties.getByteWriter(ByteWriterFactory.Longevity longevity, ByteWriterFactory.EncryptionStatus encryption, ByteWriterFactory.Fixed fixed, long size, boolean fast) Request a singleByteWriterwith the given properties.
-
Method Details
-
getByteWriter
ByteWriter getByteWriter(ByteWriterFactory.Longevity longevity, ByteWriterFactory.EncryptionStatus encryption, ByteWriterFactory.Fixed fixed, long size, boolean fast) throws IOException Request a singleByteWriterwith the given properties. An implementation is free to ignore the properties or to use them in any way that it views appropriate in choosing the right kind ofByteWriterto return. These should be viewed as "advice" to the implementation about the intended usage.- Parameters:
longevity- anticipated lifetime of theByteWriterencryption- encryption status of the data to be placed into theByteWriterfixed- whether the size given is the maximum data that will ever be placed into theByteWritersize- either the maximum size of the data or an estimate of the size depending on the value of thefixedparameterfast- the requestedByteWriterneeds to be fast- Returns:
- a
ByteWritermatching your properties to some degree of "match" - Throws:
IOException
-
getByteWriter
ByteWriter[] getByteWriter(ByteWriterFactory.Longevity longevity, ByteWriterFactory.EncryptionStatus encryption, ByteWriterFactory.Fixed fixed, long[] size, boolean fast) throws IOException Request an arrayByteWriterinstances with the given properties. An implementation is free to ignore the properties or to use them in any way that it views appropriate in choosing the right kind ofByteWriterto return. These should be viewed as "advice" to the implementation about the intended usage.- Parameters:
longevity- anticipated lifetime of theByteWriterencryption- encryption status of the data to be placed into theByteWriterfixed- whether the size given is the maximum data that will ever be placed into theByteWritersize- either the maximum size of the data or an estimate of the size depending on the value of thefixedparameterfast- the requestedByteWriterneeds to be fast- Returns:
- a
ByteWritermatching your properties to some degree of "match" - Throws:
IOException
-
closeByteWriter
The caller has finished with the givenByteWriterand will no longer use it again. The implementation can close it.- Parameters:
byteWriter- a no longer neededByteWriter- Throws:
IOException
-
closeFactory
TheByteWriterFactoryis no longer needed and it should close down and free all resources allocated. AllByteWriterinstances created by this factory can and may be destroyed during this process.- Throws:
IOException
-