getBERPayloadLength() Returns the length of the payload of this BERSerializable
object in bytes when encoded according to the Basic Encoding Rules (BER).
mask(OctetString mask) Returns a copy of this OctetString where each bit not set in the supplied
mask zeros the corresponding bit in the returned OctetString.
final public void
set(int index, byte b) Sets the byte value at the specified index.
split(OctetString octetString, OctetString delimOctets) Splits an OctetString using a set of delimiter characters
similar to how a StringTokenizer would do it.
public boolean
startsWith(OctetString prefix) Tests if this octet string starts with the specified prefix.
Creates an octet string from an byte array.
Parameters: rawValue - an array of bytes.
OctetString
public OctetString(byte[] rawValue, int offset, int length)(Code)
Creates an octet string from an byte array.
Parameters: rawValue - an array of bytes. Parameters: offset - the position (zero based) of the first byte to be copied fromrawValueinto the new OctetSring. Parameters: length - the number of bytes to be copied.
Appends the supplied string to this OctetString. Calling this
method is identical to append(string.getBytes()).
Parameters: string - a String instance.
Creates an OctetString from an byte array.
Parameters: value - a byte array that is copied into the value of the createdOctetString or null.an OctetString or null if valueis null. since: 1.7
Creates an OctetString from a string represantation in the specified
radix.
Parameters: string - the string representation of an octet string. Parameters: radix - the radix of the string represantion.the OctetString instance. since: 1.6
fromSubIndex
public void fromSubIndex(OID subIndex, boolean impliedLength)(Code)
Gets the byte at the specified index.
Parameters: index - a zero-based index into the octet string.the byte value at the specified index. throws: ArrayIndexOutOfBoundsException - if index < 0 or > OctetString.length().
Returns the length of the payload of this BERSerializable
object in bytes when encoded according to the Basic Encoding Rules (BER).
the BER encoded length of this variable.
Determines whether this octet string contains non ISO control characters
only.
false if this octet string contains any ISO controlcharacters as defined by Character.isISOControl(char)except if these ISO control characters are all whitespace charactersas defined by Character.isWhitespace(char).
Returns a copy of this OctetString where each bit not set in the supplied
mask zeros the corresponding bit in the returned OctetString.
Parameters: mask - a mask where the n-th bit corresponds to the n-th bit in the returnedOctetString.the masked OctetString. since: 1.7
Sets the byte value at the specified index.
Parameters: index - an index value greater or equal 0 and less than OctetString.length(). Parameters: b - the byte value to set. since: v1.2
Splits an OctetString using a set of delimiter characters
similar to how a StringTokenizer would do it.
Parameters: octetString - the input string to tokenize. Parameters: delimOctets - a set of delimiter octets.a Collection of OctetString instances that contain the tokens.
Tests if this octet string starts with the specified prefix.
Parameters: prefix - the prefix.true if the bytes of this octet string up to the lengthof prefix equal those of prefix. since: 1.2
Returns a new string that is a substring of this string. The substring
begins at the specified beginIndex and extends to the
character at index endIndex - 1.
Thus the length of the substring is endIndex-beginIndex.
Parameters: beginIndex - the beginning index, inclusive. Parameters: endIndex - the ending index, exclusive.the specified substring. since: 1.3
Formats the content into a ASCII string. Non-printable characters are
replaced by the supplied placeholder character.
Parameters: placeholder - a placeholder character, for example '.'.the contents of this octet string as ASCII formatted string. since: 1.6
Returns a string representation of this octet string in the radix
specified. There will be no separation characters, but each byte will
be represented by round(log(256)/log(radix)) digits.
Parameters: radix - the radix to use in the string representation.a string representation of this ocetet string in the specified radix. since: 1.6