cdx
Class ASCIIConverter

java.lang.Object
  extended by cdx.ASCIIConverter

public class ASCIIConverter
extends java.lang.Object

The purpose of this class is to permit printing of debug messages with callsigns (byte arrays) and floating point data from a no-heap thread. With standard Java ways of doing this, we get MemoryAccessError due to the internal use of ThreadLocal by Sun RTS for character encoders/decoders (and possibly other things). With encoders/decoders, lazy initialisation leads to uncontrolled allocation w.r.t. to scope. Most likely the problem is that the thread locals get allocated on the heap.


Constructor Summary
ASCIIConverter()
           
 
Method Summary
static java.lang.String bytesToString(byte[] bytes)
          Convert byte[] to a string
static java.lang.String floatToString(float f)
          Convert a float to a string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ASCIIConverter

public ASCIIConverter()
Method Detail

bytesToString

public static java.lang.String bytesToString(byte[] bytes)
Convert byte[] to a string

Parameters:
bytes - The converted object
Returns:
A string from bytes

floatToString

public static java.lang.String floatToString(float f)
Convert a float to a string

Parameters:
f - The converted object
Returns:
A string from float