Package java.io

Examples of java.io.Externalizable


        }
      }
    }
    else if (obj instanceof Externalizable && (!Proxy.isProxyClass(cls)))
    {
      Externalizable extObj = (Externalizable)obj;
      try
      {
        extObj.writeExternal(new ObjectOutputAdaptor()
        {
          private int count = 0;

          @Override
          public void writeObject(Object streamObj) throws IOException
View Full Code Here


        }
      }
    }
    else if (obj instanceof Externalizable && (!Proxy.isProxyClass(cls)))
    {
      Externalizable extObj = (Externalizable)obj;
      try
      {
        extObj.writeExternal(new ObjectOutputAdaptor()
        {
          private int count = 0;

          @Override
          public void writeObject(Object streamObj) throws IOException
View Full Code Here

        }
      }
    }
    else if (obj instanceof Externalizable && (!Proxy.isProxyClass(cls)))
    {
      Externalizable extObj = (Externalizable)obj;
      try
      {
        extObj.writeExternal(new ObjectOutputAdaptor()
        {
          private int count = 0;

          @Override
          public void writeObject(Object streamObj) throws IOException
View Full Code Here

        }
      }
    }
    else if (obj instanceof Externalizable && (!Proxy.isProxyClass(cls)))
    {
      Externalizable extObj = (Externalizable)obj;
      try
      {
        extObj.writeExternal(new ObjectOutputAdaptor()
        {
          private int count = 0;

          public void writeObject(Object streamObj) throws IOException
          {
View Full Code Here

            String value = source.getText();
            ByteArrayInputStream bis = new ByteArrayInputStream(Base64Binary.decode(value));
            ObjectInputStream ois = new ObjectInputStream(bis);
            Object obj = ois.readObject();
            ois.close();
            Externalizable aReference = (Externalizable) obj;
            return aReference;
        } catch (Exception e) {
            throw new TransformationException(e);
        }
    }
View Full Code Here

        Object neColumn = row[arrayPosition];

        if (neColumn instanceof Externalizable)
                {

          Externalizable exColumn = (Externalizable) neColumn;

          inUserCode = true;
          exColumn.readExternal(logicalDataIn);
          inUserCode = false;

          arrayPosition++;
          continue;
        }
View Full Code Here

       */
      if (currentClassDesc.isExternalizable()) {
      // Write format version
      orbStream.write_octet(streamFormatVersion);

          Externalizable ext = (Externalizable)obj;
          ext.writeExternal(this);
           
      } else {

          /* The object's classes should be processed from supertype to subtype
           * Push all the clases of the current object onto a stack.
View Full Code Here

            String value = source.getText();
            ByteArrayInputStream bis = new ByteArrayInputStream(Base64Binary.decode(value));
            ObjectInputStream ois = new ObjectInputStream(bis);
            Object obj = ois.readObject();
            ois.close();
            Externalizable aReference = (Externalizable) obj;
            return aReference;
        } catch (Exception e) {
            throw new TransformationException(e);
        }
    }
View Full Code Here

        }
        final SerializableClass cloneInfo = sameClass ? info : registry.lookup(clonedClass);
        // Now check the serializable types
        final Object clone;
        if (orig instanceof Externalizable) {
            final Externalizable externalizable = (Externalizable) orig;
            clone = cloneInfo.callNoArgConstructor();
            clones.put(orig, clone);
            final Queue<Step> steps = new ArrayDeque<Step>();
            final StepObjectOutput soo = new StepObjectOutput(steps);
            externalizable.writeExternal(soo);
            soo.doFinish();
            ((Externalizable) clone).readExternal(new StepObjectInput(steps));
        } else if (serializabilityChecker.isSerializable(objClass)) {
            clone = cloneInfo.callNonInitConstructor();
            if (! (serializabilityChecker.isSerializable(clonedClass))) {
View Full Code Here

                return;
            }
            // user type #2: externalizable
            if (obj instanceof Externalizable) {
                write(unshared ? ID_NEW_OBJECT_UNSHARED : ID_NEW_OBJECT);
                final Externalizable ext = (Externalizable) obj;
                final ObjectOutput objectOutput = getObjectOutput();
                writeExternalizableClass(objClass);
                instanceCache.put(obj, instanceSeq++);
                ext.writeExternal(objectOutput);
                writeEndBlock();
                if (unshared) {
                    instanceCache.put(obj, -1);
                }
                return;
View Full Code Here

TOP

Related Classes of java.io.Externalizable

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.