|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.media.jai.OperationDescriptorImpl | +--javax.media.jai.operator.FileStoreDescriptor
An OperationDescriptor
describing the "FileStore" operation.
The "FileStore" operation writes an image to a given file in a specified
format using the supplied encoding parameters.
In the default instance the validateParameters()
method
checks for the named file to be writable if it already exists, else that
it can be created. If not, it will return false
, causing
JAI.createNS()
to throw an
IllegalArgumentException
.
In special cases such as an image being written to a remote system,
the above check for existence of a file on the local system should be
bypassed. This can be accomplished by setting the Boolean
variable checkFileLocally
to FALSE
in the
ParameterBlock
.
The third parameter contains an instance of
ImageEncodeParam
to be used during the decoding. It
may be set to null
in order to perform default
encoding, or equivalently may be omitted. If
non-null
, it must be of the correct class type for the
selected format.
The requested file path must be writable.
The classes in the com.sun.media.jai.codec
package are not a committed part of the JAI API. Future releases
of JAI will make use of new classes in their place. This
class will change accordingly.
Name | Value |
---|---|
GlobalName | filestore |
LocalName | filestore |
Vendor | com.sun.media.jai |
Description | Stores an image to a file. |
DocURL | http://java.sun.com/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/operator/FileStoreDescriptor.html |
Version | 1.0 |
arg0Desc | The path of the file to write to. |
arg1Desc | The format of the file. |
arg2Desc | The encoding parameters. |
arg3Desc | Boolean specifying whether check for file creation / writing locally should be done. |
Name | Class Type | Default Value |
---|---|---|
filename | java.lang.String | NO_PARAMETER_DEFAULT |
format | java.lang.String | "tiff" |
param | com.sun.media.jai.codec.ImageEncodeParam | null |
checkFileLocally | java.lang.Boolean | TRUE |
OperationDescriptor
, Serialized FormFields inherited from class javax.media.jai.OperationDescriptorImpl |
resources, sourceNames, supportedModes |
Fields inherited from interface javax.media.jai.OperationDescriptor |
NO_PARAMETER_DEFAULT |
Constructor Summary | |
FileStoreDescriptor()
Constructor. |
Method Summary | |
static RenderedOp |
create(RenderedImage source0,
String filename,
String format,
ImageEncodeParam param,
Boolean checkFileLocally,
RenderingHints hints)
Stores an image to a file. |
boolean |
isImmediate()
Returns true indicating that the operation should be rendered immediately during a call to JAI.create() . |
boolean |
validateArguments(String modeName,
ParameterBlock args,
StringBuffer msg)
Validates the input source and parameters. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FileStoreDescriptor()
Method Detail |
public boolean validateArguments(String modeName, ParameterBlock args, StringBuffer msg)
In addition to the standard checks performed by the
superclass method, this method checks that the format name is
recognized and is capable of encoding the source image using
the encoding parameter "param", if non-null
,
ans that the output file path "filename" is writable.
validateArguments
in class OperationDescriptorImpl
javax.media.jai.OperationDescriptorImpl
modeName
- the operation mode nameargs
- Input arguments, including source(s) and/or parameter(s).msg
- A string that may contain error messages.IllegalArgumentException
- if modeName
is null
OperationDescriptorImpl.validateSources(java.lang.String, java.awt.image.renderable.ParameterBlock, java.lang.StringBuffer)
,
OperationDescriptorImpl.validateParameters(java.lang.String, java.awt.image.renderable.ParameterBlock, java.lang.StringBuffer)
public boolean isImmediate()
JAI.create()
.isImmediate
in class OperationDescriptorImpl
OperationDescriptor
public static RenderedOp create(RenderedImage source0, String filename, String format, ImageEncodeParam param, Boolean checkFileLocally, RenderingHints hints)
Creates a ParameterBlockJAI
from all
supplied arguments except hints
and invokes
JAI.create(String,ParameterBlock,RenderingHints)
.
source0
- RenderedImage
source 0.filename
- The path of the file to write to.format
- The format of the file.
May be null
.param
- The encoding parameters.
May be null
.checkFileLocally
- Boolean specifying whether check for file
creation / writing locally should be done.
May be null
.hints
- The RenderingHints
to use.
May be null
.RenderedOp
destination.IllegalArgumentException
- if source0
is null
.IllegalArgumentException
- if filename
is null
.JAI
,
ParameterBlockJAI
,
RenderedOp
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |