|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.util.Writables
@InterfaceAudience.Private public class Writables
Utility class with methods for manipulating Writable objects
Constructor Summary | |
---|---|
Writables()
|
Method Summary | |
---|---|
static org.apache.hadoop.io.Writable |
copyWritable(byte[] bytes,
org.apache.hadoop.io.Writable tgt)
Copy one Writable to another. |
static org.apache.hadoop.io.Writable |
copyWritable(org.apache.hadoop.io.Writable src,
org.apache.hadoop.io.Writable tgt)
Copy one Writable to another. |
static byte[] |
getBytes(org.apache.hadoop.io.Writable... ws)
Put a bunch of Writables as bytes all into the one byte array. |
static byte[] |
getBytes(org.apache.hadoop.io.Writable w)
|
static org.apache.hadoop.io.Writable |
getWritable(byte[] bytes,
int offset,
int length,
org.apache.hadoop.io.Writable w)
Set bytes into the passed Writable by calling its Writable.readFields(java.io.DataInput) . |
static org.apache.hadoop.io.Writable |
getWritable(byte[] bytes,
org.apache.hadoop.io.Writable w)
Set bytes into the passed Writable by calling its Writable.readFields(java.io.DataInput) . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Writables()
Method Detail |
---|
public static byte[] getBytes(org.apache.hadoop.io.Writable w) throws IOException
w
- writable
w
gotten by running its
Writable.write(java.io.DataOutput)
method.
IOException
- egetWritable(byte[], Writable)
public static byte[] getBytes(org.apache.hadoop.io.Writable... ws) throws IOException
ws
- writable
w
gotten by running its
Writable.write(java.io.DataOutput)
method.
IOException
- epublic static org.apache.hadoop.io.Writable getWritable(byte[] bytes, org.apache.hadoop.io.Writable w) throws IOException
Writable.readFields(java.io.DataInput)
.
bytes
- serialized bytesw
- An empty Writable (usually made by calling the null-arg
constructor).
bytes
array or IllegalArgumentException
if passed null or an empty bytes
array.
IOException
- e
IllegalArgumentException
public static org.apache.hadoop.io.Writable getWritable(byte[] bytes, int offset, int length, org.apache.hadoop.io.Writable w) throws IOException
Writable.readFields(java.io.DataInput)
.
bytes
- serialized bytesoffset
- offset into arraylength
- length of dataw
- An empty Writable (usually made by calling the null-arg
constructor).
bytes
array or IllegalArgumentException
if passed null or an empty bytes
array.
IOException
- e
IllegalArgumentException
public static org.apache.hadoop.io.Writable copyWritable(org.apache.hadoop.io.Writable src, org.apache.hadoop.io.Writable tgt) throws IOException
src
- Source Writabletgt
- Target Writable
IOException
- epublic static org.apache.hadoop.io.Writable copyWritable(byte[] bytes, org.apache.hadoop.io.Writable tgt) throws IOException
bytes
- Source Writabletgt
- Target Writable
IOException
- e
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |