public class YangBinary
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected T |
value
The value of this object, of which this class is a wrapper for.
|
| Constructor and Description |
|---|
YangBinary(byte[] buffer)
Creates a YangBinary object from a base 64 encoded byte buffer.
|
YangBinary(java.lang.String value)
Creates a YangBinary object from a String.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canEqual(java.lang.Object obj)
Compares type of obj with this object to see if they can be equal.
|
void |
check()
Nop method provided because this class extends the YangBaseType class.
|
com.tailf.jnc.YangBaseType<T> |
clone()
Clones this object and its value.
|
protected YangBinary |
cloneShallow()
Clones this object without cloning its value.
|
boolean |
equals(java.lang.Object obj)
Compares this object with another object for equality.
|
protected void |
exact(int numberOfBytes)
Checks that the value buffer of this object has the specified number of
octets/bytes.
|
protected java.lang.String |
fromString(java.lang.String s)
Identity method provided because this class extends the YangBaseType
class.
|
T |
getValue() |
int |
hashCode() |
protected void |
max(int numberOfBytes)
Checks that the value buffer of this object has more than the specified
number of octets/bytes.
|
protected void |
min(int numberOfBytes)
Checks that the value buffer of this object has less than the specified
number of octets/bytes.
|
void |
setValue(byte[] buffer)
Sets the value of this object by copying a base 64 encoded byte buffer.
|
void |
setValue(java.lang.String value)
Sets the value of this object using a String.
|
java.lang.String |
toString() |
protected T value
public YangBinary(java.lang.String value)
throws YangException
value - the StringYangException - if setValue(value) doespublic YangBinary(byte[] buffer)
buffer - The base 64 encoded byte bufferpublic void setValue(java.lang.String value)
throws YangException
setValue in interface YangType<java.lang.String>value - The stringYangException - If the input is not valid Base64 encoded data.public void setValue(byte[] buffer)
buffer - The base 64 encoded byte buffer.public void check()
throws YangException
check in interface YangType<java.lang.String>YangException - If the value of this object is null.public java.lang.String toString()
protected java.lang.String fromString(java.lang.String s)
throws YangException
s - A string.YangException - If s does not contain a parsable T.public boolean canEqual(java.lang.Object obj)
obj - Object to compare type with.protected YangBinary cloneShallow() throws YangException
YangExceptionprotected void exact(int numberOfBytes)
throws YangException
len - The number of octets/bytes to check for.YangException - If value buffer does not have len number of
octets/bytes.protected void min(int numberOfBytes)
throws YangException
len - The number of octets/bytes to compare against.YangException - If value buffer does not have less than len number
of octets/bytes.protected void max(int numberOfBytes)
throws YangException
len - The number of octets/bytes to compare against.YangException - If value buffer does not have more than len number
of octets/bytes.public T getValue()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - The object to compare with.public int hashCode()
hashCode in class java.lang.Object