de.netseeker.ejoe.adapter
Class UTF8StringAdapter
java.lang.Object
de.netseeker.ejoe.adapter.BaseAdapter
de.netseeker.ejoe.adapter.UTF8StringAdapter
- All Implemented Interfaces:
- SerializeAdapter, java.io.Serializable
- Direct Known Subclasses:
- JsonLibAdapter, JsonToolsAdapter, MyJsonAdapter, SojoJsonAdapter
public class UTF8StringAdapter
- extends BaseAdapter
Simple raw string (de)Serializer for serializing/deserializing string messages. This adapter will always use UTF8
encoding.
- Since:
- 0.3.4
- Author:
- netseeker
- See Also:
- Serialized Form
Method Summary |
java.lang.String |
getContentType()
|
java.lang.Object |
read(java.io.InputStream in)
Deserializes an object out of an given InputStream |
void |
write(java.lang.Object obj,
java.io.OutputStream out)
Serializes an object into an output stream |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UTF8StringAdapter
public UTF8StringAdapter()
read
public java.lang.Object read(java.io.InputStream in)
throws java.lang.Exception
- Description copied from interface:
SerializeAdapter
- Deserializes an object out of an given InputStream
- Parameters:
in
- the input stream to use for deserialization
- Returns:
- a deserialized object instance
- Throws:
java.lang.Exception
write
public void write(java.lang.Object obj,
java.io.OutputStream out)
throws java.lang.Exception
- Description copied from interface:
SerializeAdapter
- Serializes an object into an output stream
- Parameters:
obj
- object that should get serializedout
- the outputstream into which the object should serialized
- Throws:
java.lang.Exception
getContentType
public java.lang.String getContentType()
- Specified by:
getContentType
in interface SerializeAdapter
- Overrides:
getContentType
in class BaseAdapter
- Returns:
- A recognized mime type
- See Also:
- mime type list of IANA
Copyright © 2005-2007 netseeker. All Rights Reserved.