mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-03-25 10:09:11 +01:00
java: update javadoc
This commit is contained in:
parent
3fbcde4bd7
commit
6df86384ca
@ -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);
|
||||
|
@ -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);
|
||||
|
8
java/src/main/java/org/msgpack/package-info.java
Normal file
8
java/src/main/java/org/msgpack/package-info.java
Normal 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;
|
Loading…
x
Reference in New Issue
Block a user