Java org.apache.hadoop.io BytesWritable fields, constructors, methods, implement or subclass

Example usage for Java org.apache.hadoop.io BytesWritable fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.hadoop.io BytesWritable.

The text is from its open source code.

Subclass

org.apache.hadoop.io.BytesWritable has subclasses.
Click this link to see all its subclasses.

Constructor

BytesWritable(byte[] bytes)
Create a BytesWritable using the byte array as the initial value.
BytesWritable()
Create a zero-size sequence.
BytesWritable(byte[] bytes, int length)
Create a BytesWritable using the byte array as the initial value and length as the length.

Method

intcompareTo(BinaryComparable other)
Compare bytes from {#getBytes()}.
byte[]copyBytes()
Get a copy of the bytes that is exactly the length of the data.
booleanequals(Object right_obj)
Are the two byte sequences equal?
byte[]get()
Get the data from the BytesWritable.
byte[]getBytes()
Get the data backing the BytesWritable.
intgetCapacity()
Get the capacity, which is the maximum size that could handled without resizing the backing storage.
intgetLength()
Get the current size of the buffer.
intgetSize()
Get the current size of the buffer.
voidreadFields(DataInput in)
voidset(BytesWritable newData)
Set the BytesWritable to the contents of the given newData.
voidset(byte[] newData, int offset, int length)
Set the value to a copy of the given byte range
voidsetCapacity(int new_cap)
Change the capacity of the backing storage.
voidsetSize(int size)
Change the size of the buffer.
StringtoString()
Generate the stream of bytes as hex pairs separated by ' '.
voidwrite(DataOutput out)