|
Secure iNet Factory | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jscape.inet.ssh.types.SshBoolean
public final class SshBoolean
SSH2 boolean type. A boolean value is stored as a single byte. The value 0 represents FALSE, and the value 1 represents TRUE. All non-zero values are interpreted as TRUE.
Field Summary | |
---|---|
static SshBoolean |
FALSE
The Boolean object corresponding to the primitive value false . |
static int |
LENGTH
Type's length in bytes. |
static SshBoolean |
TRUE
The SSH boolean object corresponding to the primitive value true . |
Constructor Summary | |
---|---|
SshBoolean(boolean value)
Creates a new SSH boolean instance. |
Method Summary | |
---|---|
boolean |
booleanValue()
Obtains the current value as boolean. |
boolean |
equals(java.lang.Object o)
Compares two objects for the logical equality. |
int |
hashCode()
Computes object's hash code. |
static boolean |
readBooleanFrom(java.io.InputStream in)
Reads SSH boolean value from the stream and returns it as Java boolean value. |
static SshBoolean |
readFrom(java.io.InputStream in)
Reads SSH boolean object from the stream. |
static boolean |
readValue(java.io.InputStream in)
Reads a value from the specified stream. |
java.lang.String |
toString()
Provides object string representation. |
static void |
writeBooleanTo(boolean value,
java.io.OutputStream out)
Writes the specified value to the stream. |
void |
writeTo(java.io.OutputStream out)
Writes the current SSH boolean value to the stream. |
static void |
writeValue(boolean value,
java.io.OutputStream out)
Writes the specified value to the stream. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int LENGTH
public static final SshBoolean TRUE
true
.
public static final SshBoolean FALSE
false
.
Constructor Detail |
---|
public SshBoolean(boolean value)
value
- instance valueMethod Detail |
---|
public static boolean readValue(java.io.InputStream in) throws java.io.IOException
in
- input stream
java.io.IOException
- if an I/O error occurspublic static void writeValue(boolean value, java.io.OutputStream out) throws java.io.IOException
value
- value to writeout
- output stream
java.io.IOException
- if an I/O error occurspublic static boolean readBooleanFrom(java.io.InputStream in) throws java.io.IOException
in
- input stream
java.io.IOException
- if I/O error occurspublic static SshBoolean readFrom(java.io.InputStream in) throws java.io.IOException
in
- input stream
java.io.IOException
- if I/O error occurspublic static void writeBooleanTo(boolean value, java.io.OutputStream out) throws java.io.IOException
value
- value to writeout
- output stream
java.io.IOException
- if I/O error occurspublic boolean booleanValue()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- object to compare
true
if objects are logically equal;
false
otherwisepublic int hashCode()
hashCode
in class java.lang.Object
public void writeTo(java.io.OutputStream out) throws java.io.IOException
out
- output stream
java.io.IOException
- if I/O error occurs
|
Secure iNet Factory | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |