Package javax.media.jai.remote

Examples of javax.media.jai.remote.SerializableState


      */
    private void readObject(ObjectInputStream in)
        throws IOException, ClassNotFoundException {
        in.defaultReadObject();
        if ((boolean)in.readBoolean()) {
            SerializableState ss = (SerializableState)in.readObject();
            RenderedImage ri =(RenderedImage)(ss.getObject());
            theImage = PlanarImage.wrapRenderedImage(ri);
        } else {
            theImage = null;
        }
        iter = null;
View Full Code Here


            }
            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

      */
    private void readObject(ObjectInputStream in)
        throws IOException, ClassNotFoundException {
        in.defaultReadObject();
        Object object = in.readObject();
        SerializableState ss = (SerializableState)object;
        data = (DataBuffer)ss.getObject();
    }
View Full Code Here

/*      */         } catch (IOException ioe) {
/*  933 */           throw new RemoteImagingException(ImageUtil.getStackTraceString(ioe));
/*      */         }
/*      */       }
/*      */
/*  937 */       SerializableState rp = this.remoteImage.getTile(this.id, tileX, tileY);
/*  938 */       return (Raster)rp.getObject();
/*      */     }
/*      */     catch (RemoteException e) {
/*  941 */       String message = JaiI18N.getString("RMIServerProxy15");
/*  942 */       this.listener.errorOccurred(message, new RemoteImagingException(message, e), this, false);
/*      */     }
View Full Code Here

/*     */   }
/*     */
/*     */   private void readObject(ObjectInputStream in)
/*     */     throws IOException, ClassNotFoundException
/*     */   {
/* 106 */     SerializableState sampleModelState = null;
/* 107 */     SerializableState dataBufferState = null;
/* 108 */     Point location = null;
/*     */
/* 110 */     int width = in.readInt();
/* 111 */     int height = in.readInt();
/* 112 */     sampleModelState = (SerializableState)in.readObject();
/* 113 */     dataBufferState = (SerializableState)in.readObject();
/* 114 */     location = (Point)in.readObject();
/*     */
/* 117 */     SampleModel sampleModel = (SampleModel)sampleModelState.getObject();
/* 118 */     if (sampleModel == null) {
/* 119 */       this.raster = null;
/* 120 */       return;
/*     */     }
/*     */
/* 124 */     DataBuffer dataBuffer = (DataBuffer)dataBufferState.getObject();
/*     */
/* 127 */     this.raster = Raster.createRaster(sampleModel, dataBuffer, location);
/*     */   }
View Full Code Here

/*     */   }
/*     */
/*     */   private void readObject(ObjectInputStream in)
/*     */     throws IOException, ClassNotFoundException
/*     */   {
/* 107 */     SerializableState sampleModelState = null;
/* 108 */     SerializableState dataBufferState = null;
/* 109 */     Point location = null;
/*     */
/* 111 */     int width = in.readInt();
/* 112 */     int height = in.readInt();
/* 113 */     sampleModelState = (SerializableState)in.readObject();
/* 114 */     dataBufferState = (SerializableState)in.readObject();
/* 115 */     location = (Point)in.readObject();
/*     */
/* 118 */     SampleModel sampleModel = (SampleModel)sampleModelState.getObject();
/* 119 */     if (sampleModel == null) {
/* 120 */       this.theObject = null;
/* 121 */       return;
/*     */     }
/*     */
/* 125 */     DataBuffer dataBuffer = (DataBuffer)dataBufferState.getObject();
/*     */
/* 128 */     this.theObject = Raster.createRaster(sampleModel, dataBuffer, location);
/*     */   }
View Full Code Here

/*     */
/* 330 */     Enumeration keys = table.keys();
/*     */
/* 333 */     while (keys.hasMoreElements())
/*     */     {
/* 335 */       SerializableState keyElement = (SerializableState)keys.nextElement();
/*     */
/* 338 */       Object key = keyElement.getObject();
/*     */
/* 341 */       HintElement valueElement = (HintElement)table.get(keyElement);
/*     */
/* 344 */       Object value = valueElement.getObject();
/*     */
View Full Code Here

TOP

Related Classes of javax.media.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.