com.google.gwt.user.client.rpc.SerializationStreamReader Java Examples

The following examples show how to use com.google.gwt.user.client.rpc.SerializationStreamReader. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CommandServiceCompositeSerializer.java    From putnami-web-toolkit with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public Object instantiate(SerializationStreamReader stream, String typeSignature) throws SerializationException {
	for (Serializer serializer : this.serializers) {
		try {
			Object o = serializer.instantiate(stream, typeSignature);
			if (o != null) {
				return o;
			}
		} catch (SerializationException e) {
			continue;
		}
	}
	throw new SerializationException(typeSignature);
}
 
Example #2
Source File: CommandServiceCompositeSerializer.java    From putnami-web-toolkit with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public void deserialize(SerializationStreamReader stream, Object instance, String typeSignature)
	throws SerializationException {
	for (Serializer serializer : this.serializers) {
		try {
			serializer.deserialize(stream, instance, typeSignature);
			return;
		} catch (SerializationException e) {
			continue;
		}
	}
	throw new SerializationException(typeSignature);
}
 
Example #3
Source File: CommandSerializationStreamFactory.java    From putnami-web-toolkit with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public SerializationStreamReader createStreamReader(String encoded) throws SerializationException {
	ClientSerializationStreamReader clientSerializationStreamReader =
		new ClientSerializationStreamReader(this.serializer);
	String encodedResponse = encoded;
	if (encoded.startsWith("//OK") || encodedResponse.startsWith("//EX")) {
		encodedResponse = encodedResponse.substring(4);
	}
	clientSerializationStreamReader.prepareToRead(encodedResponse);
	return clientSerializationStreamReader;
}
 
Example #4
Source File: EventListener.java    From document-management-software with GNU Lesser General Public License v3.0 5 votes vote down vote up
public EventMessage deserializeMessae(String data) {
	try {
		SerializationStreamFactory factory = (SerializationStreamFactory) GWT
				.create(WebsocketsMessageService.class);
		final SerializationStreamReader streamReader = factory.createStreamReader(data);
		final EventMessage message = (EventMessage) streamReader.readObject();
		return message;
	} catch (final SerializationException e) {
		Log.error(e.getMessage(), null, e);
	}
	return null;
}
 
Example #5
Source File: GeometrySerializer.java    From jts with GNU Lesser General Public License v2.1 5 votes vote down vote up
public static Geometry instantiate(SerializationStreamReader streamReader)
		throws SerializationException {
	WKBReader reader = sReader;
	
	String hex = streamReader.readString();
	byte[] wkb = WKBReader.hexToBytes(hex);
	
	
	try {
		Geometry g = reader.read(wkb);
		return g;
	} catch (ParseException e) {
		throw new SerializationException(e);
	}
}
 
Example #6
Source File: LinearRing_CustomFieldSerializer.java    From jts with GNU Lesser General Public License v2.1 4 votes vote down vote up
public static LinearRing instantiate(SerializationStreamReader streamReader)
		throws SerializationException {
	return (LinearRing) GeometrySerializer.instantiate(streamReader);
}
 
Example #7
Source File: Point_CustomFieldSerializer.java    From jts with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public void deserializeInstance(SerializationStreamReader streamReader,
		Point instance) throws SerializationException {
	deserialize(streamReader, instance);
}
 
Example #8
Source File: LinearRing_CustomFieldSerializer.java    From jts with GNU Lesser General Public License v2.1 4 votes vote down vote up
public static void deserialize(SerializationStreamReader streamReader,
		LinearRing instance) throws SerializationException {
	//deserialization is done during instantiation
}
 
Example #9
Source File: LinearRing_CustomFieldSerializer.java    From jts with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public LinearRing instantiateInstance(SerializationStreamReader streamReader)
		throws SerializationException {
	return instantiate(streamReader);
}
 
Example #10
Source File: LinearRing_CustomFieldSerializer.java    From jts with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public void deserializeInstance(SerializationStreamReader streamReader,
		LinearRing instance) throws SerializationException {
	deserialize(streamReader, instance);
}
 
Example #11
Source File: Polygon_CustomFieldSerializer.java    From jts with GNU Lesser General Public License v2.1 4 votes vote down vote up
public static Polygon instantiate(SerializationStreamReader streamReader)
		throws SerializationException {
	return (Polygon) GeometrySerializer.instantiate(streamReader);
}
 
Example #12
Source File: Polygon_CustomFieldSerializer.java    From jts with GNU Lesser General Public License v2.1 4 votes vote down vote up
public static void deserialize(SerializationStreamReader streamReader,
		Polygon instance) throws SerializationException {
	//deserialization is done during instantiation
}
 
Example #13
Source File: Polygon_CustomFieldSerializer.java    From jts with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public Polygon instantiateInstance(SerializationStreamReader streamReader)
		throws SerializationException {
	return instantiate(streamReader);
}
 
Example #14
Source File: Polygon_CustomFieldSerializer.java    From jts with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public void deserializeInstance(SerializationStreamReader streamReader,
		Polygon instance) throws SerializationException {
	deserialize(streamReader, instance);
}
 
Example #15
Source File: GeometryCollection_CustomFieldSerializer.java    From jts with GNU Lesser General Public License v2.1 4 votes vote down vote up
public static GeometryCollection instantiate(SerializationStreamReader streamReader)
		throws SerializationException {
	return (GeometryCollection) GeometrySerializer.instantiate(streamReader);
}
 
Example #16
Source File: GeometryCollection_CustomFieldSerializer.java    From jts with GNU Lesser General Public License v2.1 4 votes vote down vote up
public static void deserialize(SerializationStreamReader streamReader,
		GeometryCollection instance) throws SerializationException {
	//deserialization is done during instantiation
}
 
Example #17
Source File: GeometryCollection_CustomFieldSerializer.java    From jts with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public GeometryCollection instantiateInstance(SerializationStreamReader streamReader)
		throws SerializationException {
	return instantiate(streamReader);
}
 
Example #18
Source File: GeometryCollection_CustomFieldSerializer.java    From jts with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public void deserializeInstance(SerializationStreamReader streamReader,
		GeometryCollection instance) throws SerializationException {
	deserialize(streamReader, instance);
}
 
Example #19
Source File: Point_CustomFieldSerializer.java    From jts with GNU Lesser General Public License v2.1 4 votes vote down vote up
public static Point instantiate(SerializationStreamReader streamReader)
		throws SerializationException {
	return (Point) GeometrySerializer.instantiate(streamReader);
}
 
Example #20
Source File: Point_CustomFieldSerializer.java    From jts with GNU Lesser General Public License v2.1 4 votes vote down vote up
public static void deserialize(SerializationStreamReader streamReader,
		Point instance) throws SerializationException {
	//deserialization is done during instantiation
}
 
Example #21
Source File: Point_CustomFieldSerializer.java    From jts with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public Point instantiateInstance(SerializationStreamReader streamReader)
		throws SerializationException {
	return instantiate(streamReader);
}
 
Example #22
Source File: MultiLineString_CustomFieldSerializer.java    From jts with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public void deserializeInstance(SerializationStreamReader streamReader,
		MultiLineString instance) throws SerializationException {
	deserialize(streamReader, instance);
}
 
Example #23
Source File: MultiLineString_CustomFieldSerializer.java    From jts with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public MultiLineString instantiateInstance(SerializationStreamReader streamReader)
		throws SerializationException {
	return instantiate(streamReader);
}
 
Example #24
Source File: MultiLineString_CustomFieldSerializer.java    From jts with GNU Lesser General Public License v2.1 4 votes vote down vote up
public static void deserialize(SerializationStreamReader streamReader,
		MultiLineString instance) throws SerializationException {
	//deserialization is done during instantiation
}
 
Example #25
Source File: MultiLineString_CustomFieldSerializer.java    From jts with GNU Lesser General Public License v2.1 4 votes vote down vote up
public static MultiLineString instantiate(SerializationStreamReader streamReader)
		throws SerializationException {
	return (MultiLineString) GeometrySerializer.instantiate(streamReader);
}
 
Example #26
Source File: MultiPolygon_CustomFieldSerializer.java    From jts with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public void deserializeInstance(SerializationStreamReader streamReader,
		MultiPolygon instance) throws SerializationException {
	deserialize(streamReader, instance);
}
 
Example #27
Source File: MultiPolygon_CustomFieldSerializer.java    From jts with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public MultiPolygon instantiateInstance(SerializationStreamReader streamReader)
		throws SerializationException {
	return instantiate(streamReader);
}
 
Example #28
Source File: MultiPolygon_CustomFieldSerializer.java    From jts with GNU Lesser General Public License v2.1 4 votes vote down vote up
public static void deserialize(SerializationStreamReader streamReader,
		MultiPolygon instance) throws SerializationException {
	//deserialization is done during instantiation
}
 
Example #29
Source File: MultiPolygon_CustomFieldSerializer.java    From jts with GNU Lesser General Public License v2.1 4 votes vote down vote up
public static MultiPolygon instantiate(SerializationStreamReader streamReader)
		throws SerializationException {
	return (MultiPolygon) GeometrySerializer.instantiate(streamReader);
}
 
Example #30
Source File: MultiPoint_CustomFieldSerializer.java    From jts with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public void deserializeInstance(SerializationStreamReader streamReader,
		MultiPoint instance) throws SerializationException {
	deserialize(streamReader, instance);
}