org.erights.e.meta.java.io
Class DataOutputSugar

java.lang.Object
  |
  +--org.erights.e.meta.java.io.DataOutputSugar

public class DataOutputSugar
extends Object

Untamed: A sweetener defining extra messages that may be e-sent to a DataOutput

Author:
Mark S. Miller

Constructor Summary
private DataOutputSugar()
          prevent instantiation
 
Method Summary
static int writeWholeNum(DataOutput self, BigInteger wholeNum)
          Enabled: Encodes a whole number (a non-negative integer) using the Waterken Doc ExtensionNumber format.
private static int writeWholeNum(DataOutput self, BigInteger wholeNum, int highbit)
          Because this needs to write in big-endian order, but the natural algorithm generates in little endian order, this uses recursion to do the reversal.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataOutputSugar

private DataOutputSugar()
prevent instantiation

Method Detail

writeWholeNum

public static int writeWholeNum(DataOutput self,
                                BigInteger wholeNum)
                         throws IOException
Enabled: Encodes a whole number (a non-negative integer) using the Waterken Doc ExtensionNumber format.

Parameters:
self -
wholeNum -
IOException

writeWholeNum

private static int writeWholeNum(DataOutput self,
                                 BigInteger wholeNum,
                                 int highbit)
                          throws IOException
Because this needs to write in big-endian order, but the natural algorithm generates in little endian order, this uses recursion to do the reversal.

Parameters:
self -
wholeNum -
highbit - Either 0x00 or 0x80, which is or-ed into the low order byte.
Returns:
Throws:
IOException


comments?