org.infinispan.marshall.jboss
Class MarshallUtil

java.lang.Object
  extended by org.infinispan.marshall.jboss.MarshallUtil

@Immutable
public class MarshallUtil
extends Object

MarshallUtil.

Since:
4.0
Author:
Galder ZamarreƱo

Constructor Summary
MarshallUtil()
           
 
Method Summary
static void marshallCollection(Collection c, ObjectOutput out)
           
static void marshallMap(Map map, ObjectOutput out)
           
static int readUnsignedInt(ObjectInput in)
          Reads an int stored in variable-length format.
static long readUnsignedLong(ObjectInput in)
          Reads a long stored in variable-length format.
static void unmarshallMap(Map map, ObjectInput in)
           
static void writeUnsignedInt(ObjectOutput out, int i)
          Writes an int in a variable-length format.
static void writeUnsignedLong(ObjectOutput out, long i)
          Writes a long in a variable-length format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MarshallUtil

public MarshallUtil()
Method Detail

writeUnsignedInt

public static void writeUnsignedInt(ObjectOutput out,
                                    int i)
                             throws IOException
Writes an int in a variable-length format. Writes between one and five bytes. Smaller values take fewer bytes. Negative numbers are not supported.

Parameters:
i - int to write
Throws:
IOException

readUnsignedInt

public static int readUnsignedInt(ObjectInput in)
                           throws IOException
Reads an int stored in variable-length format. Reads between one and five bytes. Smaller values take fewer bytes. Negative numbers are not supported.

Throws:
IOException

marshallCollection

public static void marshallCollection(Collection c,
                                      ObjectOutput out)
                               throws IOException
Throws:
IOException

marshallMap

public static void marshallMap(Map map,
                               ObjectOutput out)
                        throws IOException
Throws:
IOException

unmarshallMap

public static void unmarshallMap(Map map,
                                 ObjectInput in)
                          throws IOException,
                                 ClassNotFoundException
Throws:
IOException
ClassNotFoundException

writeUnsignedLong

public static void writeUnsignedLong(ObjectOutput out,
                                     long i)
                              throws IOException
Writes a long in a variable-length format. Writes between one and nine bytes. Smaller values take fewer bytes. Negative numbers are not supported.

Parameters:
i - int to write
Throws:
IOException

readUnsignedLong

public static long readUnsignedLong(ObjectInput in)
                             throws IOException
Reads a long stored in variable-length format. Reads between one and nine bytes. Smaller values take fewer bytes. Negative numbers are not supported.

Throws:
IOException


Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.