Package org.eclipse.ecf.sync

Examples of org.eclipse.ecf.sync.SerializationException


        try {
            final ByteArrayInputStream bins = new ByteArrayInputStream(bytes);
            final ObjectInputStream oins = new ObjectInputStream(bins);
            return (Message) oins.readObject();
        } catch (final Exception e) {
            throw new SerializationException("could not deserialize message", e);
        }
    }   
View Full Code Here


            final ByteArrayOutputStream bos = new ByteArrayOutputStream();
            final ObjectOutputStream oos = new ObjectOutputStream(bos);
            oos.writeObject(this);
            return bos.toByteArray();
        } catch (final Exception e) {
            throw new SerializationException("could not serialize message.", e);
        }
    }
View Full Code Here

    try {
      final ByteArrayInputStream bins = new ByteArrayInputStream(bytes);
      final ObjectInputStream oins = new ObjectInputStream(bins);
      return (IModelChangeMessage) oins.readObject();
    } catch (final Exception e) {
      throw new SerializationException(Messages.DocShare_EXCEPTION_DESERIALIZING_MESSAGE0, e);
    }
  }
View Full Code Here

      final ByteArrayOutputStream bos = new ByteArrayOutputStream();
      final ObjectOutputStream oos = new ObjectOutputStream(bos);
      oos.writeObject(this);
      return bos.toByteArray();
    } catch (final Exception e) {
      throw new SerializationException(Messages.DocShare_EXCEPTION_DESERIALIZING_MESSAGE0, e);
    }
  }
View Full Code Here

          bytes)).readObject();
      if (object instanceof BatchModelChange
          || object instanceof IResourceChange) {
        return (IModelChange) object;
      } else {
        throw new SerializationException(
            "Resources synchronization does not support deserializing "
                + object.getClass() + " instances");
      }
    } catch (IOException e) {
      throw new SerializationException("Failed to read object");
    } catch (ClassNotFoundException e) {
      throw new SerializationException("Failed to load object class");
    }
  }
View Full Code Here

      final ByteArrayOutputStream bos = new ByteArrayOutputStream();
      final ObjectOutputStream oos = new ObjectOutputStream(bos);
      oos.writeObject(object);
      return bos.toByteArray();
    } catch (IOException e) {
      throw new SerializationException(e);
    }
  }
View Full Code Here

    try {
      final ByteArrayInputStream bins = new ByteArrayInputStream(bytes);
      final ObjectInputStream oins = new ObjectInputStream(bins);
      return (IModelChangeMessage) oins.readObject();
    } catch (final Exception e) {
      throw new SerializationException(Messages.DocShare_EXCEPTION_DESERIALIZING_MESSAGE0, e);
    }
  }
View Full Code Here

      final ByteArrayOutputStream bos = new ByteArrayOutputStream();
      final ObjectOutputStream oos = new ObjectOutputStream(bos);
      oos.writeObject(this);
      return bos.toByteArray();
    } catch (final Exception e) {
      throw new SerializationException(Messages.DocShare_EXCEPTION_DESERIALIZING_MESSAGE0, e);
    }
  }
View Full Code Here

      final ByteArrayOutputStream bos = new ByteArrayOutputStream();
      final ObjectOutputStream oos = new ObjectOutputStream(bos);
      oos.writeObject(this);
      return bos.toByteArray();
    } catch (Exception e) {
      throw new SerializationException(e);
    }
  }
View Full Code Here

    try {
      final ByteArrayInputStream bins = new ByteArrayInputStream(bytes);
      final ObjectInputStream oins = new ObjectInputStream(bins);
      return (DocumentChangeMessage) oins.readObject();
    } catch (final Exception e) {
      throw new SerializationException("Exception deserializing DocumentChangeMessage", e);
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.ecf.sync.SerializationException

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.