Package java.io

Examples of java.io.Externalizable.writeExternal()


    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

      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

            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

                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

                        "Objects are not allowed to call ObjectOutput.close() from writeExternal()");
                }
            };
            @SuppressWarnings("resource")
            final CustomObjectOutputStream objectOutput = CustomObjectOutputStream.getInstance(context, callback);
            externalizable.writeExternal(objectOutput);
            objectOutput.popCallback();
        } catch (final IOException e) {
            throw new ConversionException("Cannot serialize " + source.getClass().getName() + " using Externalization",
                e);
        }
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

        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

TOP
Copyright © 2018 www.massapi.com. 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.