@InterfaceAudience.Public @InterfaceStability.Stable public class DataByteArray extends Object implements Comparable, Serializable
| Constructor and Description | 
|---|
| DataByteArray()Default constructor. | 
| DataByteArray(byte[] b)Construct a byte array using the provided bytes as the content. | 
| DataByteArray(byte[] b,
             int start,
             int end)Construct a byte array using a portion of the provided bytes as content. | 
| DataByteArray(DataByteArray b,
             DataByteArray c)Construct a byte array concatenating the two provided 
 byte arrays as the content. | 
| DataByteArray(String s)Construct a byte array from a String. | 
| Modifier and Type | Method and Description | 
|---|---|
| DataByteArray | append(byte[] ba) | 
| DataByteArray | append(byte[] ba,
      int start,
      int baLength) | 
| DataByteArray | append(DataByteArray b)Append given byte array to the internal byte array. | 
| DataByteArray | append(String str) | 
| static int | compare(byte[] b1,
       byte[] b2) | 
| int | compareTo(Object other)Compare two byte arrays. | 
| boolean | equals(Object other) | 
| byte[] | get()Get the underlying byte array. | 
| int | hashCode() | 
| static int | hashCode(byte[] buf) | 
| void | set(byte[] b)Set the internal byte array. | 
| void | set(String s)Set the internal byte array. | 
| int | size()Find the size of the byte array. | 
| String | toString()Convert the byte array to a string. | 
public DataByteArray()
public DataByteArray(byte[] b)
b - byte array to use as content.  A reference to the bytes
 will be taken, the underlying bytes will not be copied.public DataByteArray(DataByteArray b, DataByteArray c)
b - the first byte array to use as content.c - the other byte array to use as content.public DataByteArray(byte[] b,
                     int start,
                     int end)
b - byte array to read from.  A copy of the underlying bytes will be
 made.start - starting point to copy fromend - ending point to copy to, exclusive.public DataByteArray(String s)
s - String to make a byte array out of.public int size()
public byte[] get()
public void set(byte[] b)
b - byte array to store.  The contents of the byte array are
 not copied.public void set(String s)
s - String to copy.  The contents of the string are copied.public DataByteArray append(DataByteArray b)
b - byte array who's contents to append.  The contents of the byte array are
 copied.public DataByteArray append(byte[] ba)
public DataByteArray append(byte[] ba, int start, int baLength)
public DataByteArray append(String str)
public String toString()
public int compareTo(Object other)
DataType.compare(java.lang.Object, java.lang.Object) will be called.compareTo in interface Comparableother - Other object to compare to.public static int compare(byte[] b1,
                          byte[] b2)
public static int hashCode(byte[] buf)
Copyright © 2007-2017 The Apache Software Foundation