| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.record.Buffer
@Deprecated @InterfaceAudience.Public @InterfaceStability.Stable public class Buffer
A byte sequence that is used as a Java native type for buffer. It is resizable and distinguishes between the count of the seqeunce and the current capacity.
| Constructor Summary | |
|---|---|
| Buffer()Deprecated. Create a zero-count sequence. | |
| Buffer(byte[] bytes)Deprecated. Create a Buffer using the byte array as the initial value. | |
| Buffer(byte[] bytes,
             int offset,
             int length)Deprecated. Create a Buffer using the byte range as the initial value. | |
| Method Summary | |
|---|---|
|  void | append(byte[] bytes)Deprecated. Append specified bytes to the buffer | 
|  void | append(byte[] bytes,
             int offset,
             int length)Deprecated. Append specified bytes to the buffer. | 
|  Object | clone()Deprecated. | 
|  int | compareTo(Object other)Deprecated. Define the sort order of the Buffer. | 
|  void | copy(byte[] bytes,
         int offset,
         int length)Deprecated. Copy the specified byte array to the Buffer. | 
|  boolean | equals(Object other)Deprecated. | 
|  byte[] | get()Deprecated. Get the data from the Buffer. | 
|  int | getCapacity()Deprecated. Get the capacity, which is the maximum count that could handled without resizing the backing storage. | 
|  int | getCount()Deprecated. Get the current count of the buffer. | 
|  int | hashCode()Deprecated. | 
|  void | reset()Deprecated. Reset the buffer to 0 size | 
|  void | set(byte[] bytes)Deprecated. Use the specified bytes array as underlying sequence. | 
|  void | setCapacity(int newCapacity)Deprecated. Change the capacity of the backing storage. | 
|  String | toString()Deprecated. | 
|  String | toString(String charsetName)Deprecated. Convert the byte buffer to a string an specific character encoding | 
|  void | truncate()Deprecated. Change the capacity of the backing store to be the same as the current count of buffer. | 
| Methods inherited from class java.lang.Object | 
|---|
| finalize, getClass, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
|---|
public Buffer()
public Buffer(byte[] bytes)
bytes - This array becomes the backing storage for the object.
public Buffer(byte[] bytes,
              int offset,
              int length)
bytes - Copy of this array becomes the backing storage for the object.offset - offset into byte arraylength - length of data| Method Detail | 
|---|
public void set(byte[] bytes)
bytes - byte sequence
public final void copy(byte[] bytes,
                       int offset,
                       int length)
bytes - byte array to be assignedoffset - offset into byte arraylength - length of datapublic byte[] get()
public int getCount()
public int getCapacity()
public void setCapacity(int newCapacity)
newCapacity - The new capacity in bytes.public void reset()
public void truncate()
public void append(byte[] bytes,
                   int offset,
                   int length)
bytes - byte array to be appendedoffset - offset into byte arraylength - length of datapublic void append(byte[] bytes)
bytes - byte array to be appendedpublic int hashCode()
hashCode in class Objectpublic int compareTo(Object other)
compareTo in interface Comparableother - The other buffer
public boolean equals(Object other)
equals in class Objectpublic String toString()
toString in class Object
public String toString(String charsetName)
                throws UnsupportedEncodingException
charsetName - Valid Java Character Set Name
UnsupportedEncodingException
public Object clone()
             throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedException| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||