Package com.lightcrafts.mediax.jai.remote

Examples of com.lightcrafts.mediax.jai.remote.SerializableState


            }
            else {
                if (!(object instanceof SerializableState))
                    raster = null;
                // Reconstruct the Raster from the serialized form.
                SerializableState ss = (SerializableState)object;
                Class c = ss.getObjectClass();
                if (Raster.class.isAssignableFrom(c)) {
                    raster = (Raster)ss.getObject();
                }
                else raster = null;
            }

      // Close the various streams and the socket.
View Full Code Here


            source = new RemoteImage(serverName+"::"+id.longValue(),
                                     (RenderedImage)null);
        }

        // Read the source vector and properties table.
        SerializableState smState = (SerializableState)in.readObject();
        sampleModel = (SampleModel)smState.getObject();
        SerializableState cmState = (SerializableState)in.readObject();
        colorModel = (ColorModel)cmState.getObject();
        properties = (Hashtable)in.readObject();

        // Read the image Raster.
        if (useDeepCopy) {
            if (useTileCodec)
                imageRaster =
        decodeRasterFromByteArray((byte[])in.readObject());
            else {
                SerializableState rasState =
        (SerializableState)in.readObject();
                imageRaster = (Raster)rasState.getObject();
            }
        }
    }
View Full Code Here

                if (!pbCloned) {
                    pbClone = (ParameterBlock)pb.clone();
                    pbCloned = true;
                }
                if (source instanceof RenderedImage) {
                    SerializableState serializableImage =
                        SerializerFactory.getState(source, null);
                    pbClone.setSource(serializableImage, index);
                } else {
                    throw new RuntimeException(source.getClass().getName() +
                        JaiI18N.getString("OperationNodeSupport0"));
View Full Code Here

        // Read non-static and non-transient fields.
        in.defaultReadObject();
        // Read ParameterBlock.
        pb = (ParameterBlock)in.readObject();
        // Read RenderingHints.
        SerializableState ss = (SerializableState)in.readObject();
        hints = (RenderingHints)ss.getObject();

        // Wrap any RenderedImageState sources in PlanarImage objects.
        for (int index = 0; index < pb.getNumSources(); index++) {
            Object source = pb.getSource(index);
            if (source instanceof SerializableState) {
                ss = (SerializableState)source;
                PlanarImage pi =
                    PlanarImage.wrapRenderedImage((RenderedImage)ss.getObject());
                pb.setSource(pi, index);
            }
        }

        // Extract Raster and PlanarImage parameters from RasterState and
View Full Code Here

        if(isValid(SAMPLE_MODEL_MASK)) {
            Object object = in.readObject();
            if (!(object instanceof SerializableState))
                sampleModel = null;

            SerializableState ss = (SerializableState)object;
            Class c = ss.getObjectClass();
            if (SampleModel.class.isAssignableFrom(c))
                sampleModel = (SampleModel)ss.getObject();
            else
                sampleModel = null;
        }

        // Read the serializable form of the ColorModel.
        if(isValid(COLOR_MODEL_MASK)) {
            Object object = in.readObject();
            if (!(object instanceof SerializableState))
                colorModel = null;

            SerializableState ss = (SerializableState)object;
            Class c = ss.getObjectClass();
            if (ColorModel.class.isAssignableFrom(c))
                colorModel = (ColorModel)ss.getObject();
            else
                colorModel = null;
        }
    }
View Full Code Here

        Object[] source = (Object[])in.readObject();
        numSources = source.length;
        renderedSource = new RenderedImage[numSources];
        for (int i = 0; i < numSources; i++) {
            if (source[i] instanceof SerializableState) {
                SerializableState ss = (SerializableState)source[i];
                renderedSource[i] = (RenderedImage)ss.getObject();
            } else renderedSource[i] = (RenderedImage)source[i];
        }
    }
View Full Code Here

TOP

Related Classes of com.lightcrafts.mediax.jai.remote.SerializableState

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.