|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.dyuproject.protostuff.SmileIOUtil
public final class SmileIOUtil
Smile IO utilities for messages.
| Nested Class Summary | |
|---|---|
static class |
SmileIOUtil.Factory
A custom factory simply to expose certain fields. |
| Field Summary | |
|---|---|
static SmileIOUtil.Factory |
DEFAULT_SMILE_FACTORY
The default smile factory for creating smile parsers and generators. |
| Method Summary | ||
|---|---|---|
static
|
mergeFrom(byte[] data,
int offset,
int length,
T message,
Schema<T> schema,
boolean numeric)
Merges the message with the byte array using the given schema. |
|
static
|
mergeFrom(byte[] data,
T message,
Schema<T> schema,
boolean numeric)
Merges the message with the byte array using the given schema. |
|
static
|
mergeFrom(java.io.InputStream in,
T message,
Schema<T> schema,
boolean numeric)
Merges the message from the InputStream using the
given schema. |
|
static
|
mergeFrom(java.io.InputStream in,
T message,
Schema<T> schema,
boolean numeric,
LinkedBuffer buffer)
Merges the message from the InputStream using the
given schema. |
|
static Pipe |
newPipe(byte[] data,
boolean numeric)
Creates a smile pipe from a byte array. |
|
static Pipe |
newPipe(byte[] data,
int offset,
int length,
boolean numeric)
Creates a smile pipe from a byte array. |
|
static Pipe |
newPipe(java.io.InputStream in,
boolean numeric)
Creates a smile pipe from an InputStream. |
|
static org.codehaus.jackson.smile.SmileGenerator |
newSmileGenerator(java.io.OutputStream out,
byte[] buf)
Creates a SmileGenerator for the outputstream with the supplied buf
outBuffer to use. |
|
static org.codehaus.jackson.smile.SmileParser |
newSmileParser(java.io.InputStream in,
byte[] buf,
int offset,
int limit)
Creates a SmileParser from the inputstream with the supplied
buf inBuffer to use. |
|
static
|
parseListFrom(java.io.InputStream in,
Schema<T> schema,
boolean numeric)
Parses the messages from the stream using the given schema. |
|
static
|
parseListFrom(java.io.InputStream in,
Schema<T> schema,
boolean numeric,
LinkedBuffer buffer)
Parses the messages from the stream using the given schema. |
|
static
|
toByteArray(T message,
Schema<T> schema,
boolean numeric)
Serializes the message into a byte array
using the given schema. |
|
static
|
toByteArray(T message,
Schema<T> schema,
boolean numeric,
LinkedBuffer buffer)
Serializes the message into a byte array
using the given schema. |
|
static
|
writeListTo(java.io.OutputStream out,
java.util.List<T> messages,
Schema<T> schema,
boolean numeric)
Serializes the messages into the stream using the given schema. |
|
static
|
writeListTo(java.io.OutputStream out,
java.util.List<T> messages,
Schema<T> schema,
boolean numeric,
LinkedBuffer buffer)
Serializes the messages into the stream using the given schema. |
|
static
|
writeTo(java.io.OutputStream out,
T message,
Schema<T> schema,
boolean numeric)
Serializes the message into an OutputStream
using the given schema. |
|
static
|
writeTo(java.io.OutputStream out,
T message,
Schema<T> schema,
boolean numeric,
LinkedBuffer buffer)
Serializes the message into an OutputStream
using the given schema. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final SmileIOUtil.Factory DEFAULT_SMILE_FACTORY
| Method Detail |
|---|
public static Pipe newPipe(byte[] data,
boolean numeric)
throws java.io.IOException
java.io.IOException
public static Pipe newPipe(byte[] data,
int offset,
int length,
boolean numeric)
throws java.io.IOException
java.io.IOException
public static Pipe newPipe(java.io.InputStream in,
boolean numeric)
throws java.io.IOException
InputStream.
java.io.IOException
public static org.codehaus.jackson.smile.SmileParser newSmileParser(java.io.InputStream in,
byte[] buf,
int offset,
int limit)
throws java.io.IOException
SmileParser from the inputstream with the supplied
buf inBuffer to use.
java.io.IOException
public static org.codehaus.jackson.smile.SmileGenerator newSmileGenerator(java.io.OutputStream out,
byte[] buf)
SmileGenerator for the outputstream with the supplied buf
outBuffer to use.
public static <T> void mergeFrom(byte[] data,
T message,
Schema<T> schema,
boolean numeric)
throws java.io.IOException
message with the byte array using the given schema.
java.io.IOException
public static <T> void mergeFrom(byte[] data,
int offset,
int length,
T message,
Schema<T> schema,
boolean numeric)
throws java.io.IOException
message with the byte array using the given schema.
java.io.IOException
public static <T> void mergeFrom(java.io.InputStream in,
T message,
Schema<T> schema,
boolean numeric)
throws java.io.IOException
message from the InputStream using the
given schema.
java.io.IOException
public static <T> void mergeFrom(java.io.InputStream in,
T message,
Schema<T> schema,
boolean numeric,
LinkedBuffer buffer)
throws java.io.IOException
message from the InputStream using the
given schema.
The LinkedBuffer's internal byte array will be used when reading the
message.
java.io.IOException
public static <T> byte[] toByteArray(T message,
Schema<T> schema,
boolean numeric)
message into a byte array
using the given schema.
public static <T> byte[] toByteArray(T message,
Schema<T> schema,
boolean numeric,
LinkedBuffer buffer)
message into a byte array
using the given schema.
The LinkedBuffer's internal byte array will be used as the primary buffer
when writing the message.
public static <T> void writeTo(java.io.OutputStream out,
T message,
Schema<T> schema,
boolean numeric)
throws java.io.IOException
message into an OutputStream
using the given schema.
java.io.IOException
public static <T> void writeTo(java.io.OutputStream out,
T message,
Schema<T> schema,
boolean numeric,
LinkedBuffer buffer)
throws java.io.IOException
message into an OutputStream
using the given schema.
The LinkedBuffer's internal byte array will be used as the primary buffer
when writing the message.
java.io.IOException
public static <T> void writeListTo(java.io.OutputStream out,
java.util.List<T> messages,
Schema<T> schema,
boolean numeric)
throws java.io.IOException
messages into the stream using the given schema.
java.io.IOException
public static <T> void writeListTo(java.io.OutputStream out,
java.util.List<T> messages,
Schema<T> schema,
boolean numeric,
LinkedBuffer buffer)
throws java.io.IOException
messages into the stream using the given schema.
The LinkedBuffer's internal byte array will be used as the primary buffer
when writing the message.
java.io.IOException
public static <T> java.util.List<T> parseListFrom(java.io.InputStream in,
Schema<T> schema,
boolean numeric)
throws java.io.IOException
messages from the stream using the given schema.
java.io.IOException
public static <T> java.util.List<T> parseListFrom(java.io.InputStream in,
Schema<T> schema,
boolean numeric,
LinkedBuffer buffer)
throws java.io.IOException
messages from the stream using the given schema.
The LinkedBuffer's internal byte array will be used when reading the
message.
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||