java: update javadoc

This commit is contained in:
frsyuki 2010-05-29 07:54:49 +09:00
parent 3fbcde4bd7
commit 6df86384ca
3 changed files with 29 additions and 3 deletions

View File

@ -23,6 +23,22 @@ import java.nio.ByteBuffer;
import java.util.List;
import java.util.Map;
/**
* Packer enables you to serialize objects into OutputStream.
*
* <pre>
* // create a packer with output stream
* Packer pk = new Packer(System.out);
*
* // store an object with pack() method.
* pk.pack(1);
*
* // you can store String, List, Map, byte[] and primitive types.
* pk.pack(new ArrayList());
* </pre>
*
* You can serialize objects that implements {@link MessagePackable} interface.
*/
public class Packer {
protected byte[] castBytes = new byte[9];
protected ByteBuffer castBuffer = ByteBuffer.wrap(castBytes);

View File

@ -24,11 +24,13 @@ import java.util.Iterator;
import java.nio.ByteBuffer;
/**
* Deserializer class that includes Buffered API, Unbuffered API,
* Schema API and Direct Conversion API.
* Unpacker enables you to deserialize objects from stream.
*
* Unpacker provides Buffered API, Unbuffered API, Schema API
* and Direct Conversion API.
*
* Buffered API uses the internal buffer of the Unpacker.
* Following code uses Buffered API with an input stream:
* Following code uses Buffered API with an InputStream:
* <pre>
* // create an unpacker with input stream
* Unpacker pac = new Unpacker(System.in);

View File

@ -0,0 +1,8 @@
/**
* MessagePack is a binary-based efficient object serialization library.
* It enables to exchange structured objects between many languages like JSON.
* But unlike JSON, it is very fast and small.
*
* Use {@link Packer} to serialize and {@link Unpacker} to deserialize.
*/
package org.msgpack;