public class SimpleByteWriterFactory extends Object implements ByteWriterFactory
ByteWriterFactory
that always constructs ByteArrayByteWriter
instances.ByteWriterFactory.EncryptionStatus, ByteWriterFactory.Fixed, ByteWriterFactory.Longevity| Constructor and Description |
|---|
SimpleByteWriterFactory() |
| Modifier and Type | Method and Description |
|---|---|
void |
closeByteWriter(ByteWriter byteWriter)
The caller has finished with the given
ByteWriter
and will no longer use it again. |
void |
closeFactory()
The
ByteWriterFactory is no longer needed and it should close down
and free all resources allocated. |
ByteWriter[] |
getByteWriter(ByteWriterFactory.Longevity longevity,
ByteWriterFactory.EncryptionStatus encyrption,
ByteWriterFactory.Fixed fixed,
long[] size,
boolean fast)
Request an array
ByteWriter instances with the given
properties. |
ByteWriter |
getByteWriter(ByteWriterFactory.Longevity longevity,
ByteWriterFactory.EncryptionStatus encryption,
ByteWriterFactory.Fixed fixed,
long size,
boolean fast)
Request a single
ByteWriter with the given
properties. |
public ByteWriter getByteWriter(ByteWriterFactory.Longevity longevity, ByteWriterFactory.EncryptionStatus encryption, ByteWriterFactory.Fixed fixed, long size, boolean fast)
ByteWriterFactoryByteWriter 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 of
ByteWriter to return. These should be viewed
as "advice" to the implementation about the intended usage.getByteWriter in interface ByteWriterFactorylongevity - anticipated lifetime of the ByteWriterencryption - encryption status of the data to be placed into the ByteWriterfixed - whether the size given is the maximum data that will ever be placed into the ByteWritersize - either the maximum size of the data or an estimate of the size depending on the value of the fixed parameterfast - the requested ByteWriter needs to be fastByteWriter matching your properties to some degree of "match"ByteWriterFactory.getByteWriter(com.adobe.internal.io.ByteWriterFactory.Longevity, com.adobe.internal.io.ByteWriterFactory.EncryptionStatus, com.adobe.internal.io.ByteWriterFactory.Fixed, long, boolean)public ByteWriter[] getByteWriter(ByteWriterFactory.Longevity longevity, ByteWriterFactory.EncryptionStatus encyrption, ByteWriterFactory.Fixed fixed, long[] size, boolean fast)
ByteWriterFactoryByteWriter instances 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 of
ByteWriter to return. These should be viewed
as "advice" to the implementation about the intended usage.getByteWriter in interface ByteWriterFactorylongevity - anticipated lifetime of the ByteWriterencyrption - encryption status of the data to be placed into the ByteWriterfixed - whether the size given is the maximum data that will ever be placed into the ByteWritersize - either the maximum size of the data or an estimate of the size depending on the value of the fixed parameterfast - the requested ByteWriter needs to be fastByteWriter matching your properties to some degree of "match"ByteWriterFactory.getByteWriter(com.adobe.internal.io.ByteWriterFactory.Longevity, com.adobe.internal.io.ByteWriterFactory.EncryptionStatus, com.adobe.internal.io.ByteWriterFactory.Fixed, long[], boolean)public void closeByteWriter(ByteWriter byteWriter) throws IOException
ByteWriterFactoryByteWriter
and will no longer use it again. The implementation can close it.closeByteWriter in interface ByteWriterFactorybyteWriter - a no longer needed ByteWriterIOExceptionByteWriterFactory.closeByteWriter(com.adobe.internal.io.ByteWriter)public void closeFactory()
throws IOException
ByteWriterFactoryByteWriterFactory is no longer needed and it should close down
and free all resources allocated. All ByteWriter
instances created by this factory can and may be destroyed during this process.closeFactory in interface ByteWriterFactoryIOExceptionByteWriterFactory.closeFactory()Copyright © 2010 - 2020 Adobe. All Rights Reserved