All Packages Class Hierarchy This Package Previous Next Index
Class cryptix.util.core.BI
java.lang.Object
|
+----cryptix.util.core.BI
- public class BI
- extends Object
Static methods for processing BigInteger utilitarian tasks.
Copyright © 1997
Systemics Ltd on behalf of the
Cryptix Development Team.
All rights reserved.
$Revision: 1.1.1.1 $
- Author:
- Raif S. Naffah
-
dumpString(BigInteger)
-
-
dumpString(BigInteger, String)
- Dump a BigInteger as a string, in a format that is easy to read for
debugging purposes.
-
fromStream(InputStream)
- Read a BigInteger from a stream in Big Endian format (MSB first)
in a manner compatible with
toStream
.
-
getMagnitude(BigInteger)
- Return the magnitude bytes of a BigInteger with no leading 0's.
-
toStream(BigInteger, OutputStream)
- Write a BigInteger to a stream in Big Endian format (MSB first)
in a manner compatible with fromStream.
fromStream
public static BigInteger fromStream(InputStream is) throws IOException
- Read a BigInteger from a stream in Big Endian format (MSB first)
in a manner compatible with
toStream
.
- Parameters:
- is - the input stream.
- Returns:
- a positive BigInteger read from the input stream in Big
Endian format (MSB first).
- Throws: IOException
- if an I/O error occurs.
toStream
public static void toStream(BigInteger x,
OutputStream os) throws IOException
- Write a BigInteger to a stream in Big Endian format (MSB first)
in a manner compatible with fromStream.
- Parameters:
- x - A BigInteger to write to the output stream.
- os - The output stream.
- Throws: IOException
- If an i/o error occurs.
getMagnitude
public static byte[] getMagnitude(BigInteger x)
- Return the magnitude bytes of a BigInteger with no leading 0's.
- Returns:
- the magnitude bytes of a BigInteger with no leading 0's.
dumpString
public static String dumpString(BigInteger x,
String m)
- Dump a BigInteger as a string, in a format that is easy to read for
debugging purposes. The string m is prepended to the start of
each line.
- Parameters:
- x - the BigInteger to dump
- m - a string to be prepended to each line
- Returns:
- a String containing the dump
dumpString
public static String dumpString(BigInteger x)
All Packages Class Hierarchy This Package Previous Next Index