public class ShortPacker extends Object
short
values.Constructor and Description |
---|
ShortPacker() |
Modifier and Type | Method and Description |
---|---|
static int |
getNBytes(byte firstByte)
Returns the #of bytes into which a short value was packed based on the
first byte.
|
static int |
packShort(DataOutput os,
short v)
Packs a non-negative short value into one or two bytes and writes them on
os .
|
static short |
unpackShort(DataInput is)
Unpack a non-negative short value from the input stream.
|
static short |
unpackShort(InputStream is)
Unpack a non-negative short value from the input stream.
|
public static int packShort(DataOutput os, short v) throws IOException
IOException
public static short unpackShort(DataInput is) throws IOException
is
- The input stream.IOException
public static short unpackShort(InputStream is) throws IOException
is
- The input stream.IOException
public static int getNBytes(byte firstByte)
firstByte
- The first byte.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.