public final class AsciiBytes extends Object
Constructor and Description |
---|
AsciiBytes(byte[] bytes)
Create a new
AsciiBytes from the specified bytes. |
AsciiBytes(byte[] bytes,
int offset,
int length)
Create a new
AsciiBytes from the specified bytes. |
AsciiBytes(String string)
Create a new
AsciiBytes from the specified String. |
Modifier and Type | Method and Description |
---|---|
AsciiBytes |
append(AsciiBytes asciiBytes) |
AsciiBytes |
append(byte[] bytes) |
AsciiBytes |
append(String string) |
boolean |
endsWith(AsciiBytes postfix) |
boolean |
equals(Object obj) |
int |
hashCode() |
int |
length() |
boolean |
startsWith(AsciiBytes prefix) |
AsciiBytes |
substring(int beginIndex) |
AsciiBytes |
substring(int beginIndex,
int endIndex) |
String |
toString() |
public AsciiBytes(String string)
AsciiBytes
from the specified String.string
- public AsciiBytes(byte[] bytes)
AsciiBytes
from the specified bytes. NOTE: underlying bytes
are not expected to change.bytes
- the bytespublic AsciiBytes(byte[] bytes, int offset, int length)
AsciiBytes
from the specified bytes. NOTE: underlying bytes
are not expected to change.bytes
- the bytesoffset
- the offsetlength
- the lengthpublic int length()
public boolean startsWith(AsciiBytes prefix)
public boolean endsWith(AsciiBytes postfix)
public AsciiBytes substring(int beginIndex)
public AsciiBytes substring(int beginIndex, int endIndex)
public AsciiBytes append(String string)
public AsciiBytes append(AsciiBytes asciiBytes)
public AsciiBytes append(byte[] bytes)
Copyright © 2015 Pivotal Software, Inc.. All rights reserved.