Package javax.media.jai.remote

Examples of javax.media.jai.remote.SerializableState


/* 1111 */       newParamBlock.setSources(newReplacedSources);
/*      */     }
/*      */
/* 1114 */     Object invalidRegion = od.getInvalidRegion("rendered", oldParamBlock, oldHints, newParamBlock, newHints, op);
/*      */
/* 1121 */     SerializableState shapeState = SerializerFactory.getState((Shape)invalidRegion, null);
/*      */
/* 1124 */     return shapeState;
/*      */   }
View Full Code Here


/* 1255 */       JAIRMIUtil.checkServerParameters(parameters, nodes);
/* 1256 */       op.setParameters(parameters);
/*      */     }
/* 1258 */     else if (propName.equals("renderinghints"))
/*      */     {
/* 1260 */       SerializableState newState = (SerializableState)newValue;
/* 1261 */       op.setRenderingHints((RenderingHints)newState.getObject());
/*      */     }
/*      */
/* 1264 */     return id;
/*      */   }
View Full Code Here

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

/* 535 */     Object[] source = (Object[])in.readObject();
/* 536 */     this.numSources = source.length;
/* 537 */     this.renderedSource = new RenderedImage[this.numSources];
/* 538 */     for (int i = 0; i < this.numSources; i++)
/* 539 */       if ((source[i] instanceof SerializableState)) {
/* 540 */         SerializableState ss = (SerializableState)source[i];
/* 541 */         this.renderedSource[i] = ((RenderedImage)ss.getObject()); } else {
/* 542 */         this.renderedSource[i] = ((RenderedImage)source[i]);
/*     */       }
/*     */   }
View Full Code Here

/* 790 */     if (isValid(256)) {
/* 791 */       Object object = in.readObject();
/* 792 */       if (!(object instanceof SerializableState)) {
/* 793 */         this.sampleModel = null;
/*     */       }
/* 795 */       SerializableState ss = (SerializableState)object;
/* 796 */       Class c = ss.getObjectClass();
/* 797 */       if (SampleModel.class.isAssignableFrom(c))
/* 798 */         this.sampleModel = ((SampleModel)ss.getObject());
/*     */       else {
/* 800 */         this.sampleModel = null;
/*     */       }
/*     */     }
/*     */
/* 804 */     if (isValid(512)) {
/* 805 */       Object object = in.readObject();
/* 806 */       if (!(object instanceof SerializableState)) {
/* 807 */         this.colorModel = null;
/*     */       }
/* 809 */       SerializableState ss = (SerializableState)object;
/* 810 */       Class c = ss.getObjectClass();
/* 811 */       if (ColorModel.class.isAssignableFrom(c))
/* 812 */         this.colorModel = ((ColorModel)ss.getObject());
/*     */       else
/* 814 */         this.colorModel = null;
/*     */     }
/*     */   }
View Full Code Here

/*    */   public static SampleModel deserializeSampleModel(Object object)
/*    */   {
/* 63 */     if (!(object instanceof SerializableState)) {
/* 64 */       return null;
/*    */     }
/* 66 */     SerializableState ss = (SerializableState)object;
/* 67 */     Class c = ss.getObjectClass();
/* 68 */     if (SampleModel.class.isAssignableFrom(c)) {
/* 69 */       return (SampleModel)ss.getObject();
/*    */     }
/* 71 */     return null;
/*    */   }
View Full Code Here

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

/*     */   {
/* 776 */     in.defaultReadObject();
/*     */
/* 778 */     this.pb = ((ParameterBlock)in.readObject());
/*     */
/* 780 */     SerializableState ss = (SerializableState)in.readObject();
/* 781 */     this.hints = ((RenderingHints)ss.getObject());
/*     */
/* 784 */     for (int index = 0; index < this.pb.getNumSources(); index++) {
/* 785 */       Object source = this.pb.getSource(index);
/* 786 */       if ((source instanceof SerializableState)) {
/* 787 */         ss = (SerializableState)source;
/* 788 */         PlanarImage pi = PlanarImage.wrapRenderedImage((RenderedImage)ss.getObject());
/*     */
/* 790 */         this.pb.setSource(pi, index);
/*     */       }
/*     */
/*     */     }
View Full Code Here

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

    return metadata;
  }

  protected static byte[] getDataBufferBinary(
      final DataBuffer dataBuffer ) {
    final SerializableState serializableDataBuffer = SerializerFactory.getState(dataBuffer);
    try {
      final ByteArrayOutputStream baos = new ByteArrayOutputStream();
      final ObjectOutputStream oos = new ObjectOutputStream(
          baos);
      oos.writeObject(serializableDataBuffer);
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.