com.dyuproject.protostuff
Class IntSerializer

java.lang.Object
  extended by com.dyuproject.protostuff.IntSerializer

public final class IntSerializer
extends java.lang.Object

Int32/Int64 serialization

Author:
David Yu
Date created:
Sep 20, 2010

Method Summary
static void writeInt32(int value, byte[] buffer, int offset)
          Writes the 32-bit int into the buffer starting with the most significant byte.
static void writeInt32LE(int value, byte[] buffer, int offset)
          Writes the 32-bit int into the buffer starting with the least significant byte.
static void writeInt64(long value, byte[] buffer, int offset)
          Writes the 64-bit int into the buffer starting with the most significant byte.
static void writeInt64LE(long value, byte[] buffer, int offset)
          Writes the 64-bit int into the buffer starting with the least significant byte.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

writeInt32

public static void writeInt32(int value,
                              byte[] buffer,
                              int offset)
Writes the 32-bit int into the buffer starting with the most significant byte.


writeInt32LE

public static void writeInt32LE(int value,
                                byte[] buffer,
                                int offset)
Writes the 32-bit int into the buffer starting with the least significant byte.


writeInt64

public static void writeInt64(long value,
                              byte[] buffer,
                              int offset)
Writes the 64-bit int into the buffer starting with the most significant byte.


writeInt64LE

public static void writeInt64LE(long value,
                                byte[] buffer,
                                int offset)
Writes the 64-bit int into the buffer starting with the least significant byte.



Copyright © 2009-2012. All Rights Reserved.