mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-15 07:14:48 +02:00
java: update javadoc
This commit is contained in:
@@ -23,6 +23,22 @@ import java.nio.ByteBuffer;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
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 {
|
public class Packer {
|
||||||
protected byte[] castBytes = new byte[9];
|
protected byte[] castBytes = new byte[9];
|
||||||
protected ByteBuffer castBuffer = ByteBuffer.wrap(castBytes);
|
protected ByteBuffer castBuffer = ByteBuffer.wrap(castBytes);
|
||||||
|
@@ -24,11 +24,13 @@ import java.util.Iterator;
|
|||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deserializer class that includes Buffered API, Unbuffered API,
|
* Unpacker enables you to deserialize objects from stream.
|
||||||
* Schema API and Direct Conversion API.
|
*
|
||||||
|
* Unpacker provides Buffered API, Unbuffered API, Schema API
|
||||||
|
* and Direct Conversion API.
|
||||||
*
|
*
|
||||||
* Buffered API uses the internal buffer of the Unpacker.
|
* 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>
|
* <pre>
|
||||||
* // create an unpacker with input stream
|
* // create an unpacker with input stream
|
||||||
* Unpacker pac = new Unpacker(System.in);
|
* 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;
|
Reference in New Issue
Block a user