|
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.SshMpint
public class SshMpint
Represents multiple precision integers in two's complement format, stored as a string, 8 bits per byte, MSB first. Negative numbers have the value 1 as the most significant bit of the first byte of the data partition. If the most significant bit would be set for a positive number, the number is preceded by a zero byte.
Constructor Summary | |
---|---|
SshMpint(java.math.BigInteger value)
Creates a new SSH mpint instance. |
Method Summary | |
---|---|
java.math.BigInteger |
bigIntegerValue()
Obtains the current value as big integer. |
int |
compareTo(java.lang.Object o)
Compares this object with the specified object for order. |
boolean |
equals(java.lang.Object o)
Compares two objects for the logical equality. |
int |
hashCode()
Computes object's hash code. |
static java.math.BigInteger |
readBigIntegerFrom(java.io.InputStream in)
Reads SSH mpint value from the stream and returns it as Java big integer. |
static SshMpint |
readFrom(java.io.InputStream in)
Reads SSH mpint object from the stream. |
static byte[] |
readValue(java.io.InputStream in)
Reads a value from the specified stream. |
java.lang.String |
toString()
Provides object string representation. |
static void |
writeBigIntegerTo(java.math.BigInteger value,
java.io.OutputStream out)
Writes the specified value to the stream. |
void |
writeTo(java.io.OutputStream out)
Writes the current SSH uint32 value to the stream. |
static void |
writeValue(byte[] 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 |
Constructor Detail |
---|
public SshMpint(java.math.BigInteger value)
value
- instance valueMethod Detail |
---|
public static byte[] readValue(java.io.InputStream in) throws java.io.IOException
in
- input stream
java.io.IOException
- if a error occurspublic static void writeValue(byte[] value, java.io.OutputStream out) throws java.io.IOException
value
- value to writeout
- output stream
java.io.IOException
- if an error occurspublic static java.math.BigInteger readBigIntegerFrom(java.io.InputStream in) throws java.io.IOException
in
- input stream
java.io.IOException
- if I/O error occurspublic static SshMpint readFrom(java.io.InputStream in) throws java.io.IOException
in
- input stream
java.io.IOException
- if I/O error occurspublic static void writeBigIntegerTo(java.math.BigInteger value, java.io.OutputStream out) throws java.io.IOException
value
- value to writeout
- output stream
java.io.IOException
- if I/O error occurspublic java.math.BigInteger bigIntegerValue()
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
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 compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
o
- object to be compared
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 |