Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.lutris.util
Class BytesToString  view BytesToString download BytesToString.java

java.lang.Object
  extended bycom.lutris.util.BytesToString

public class BytesToString
extends java.lang.Object

This class has static methods which convert arrays of bytes to a strings. It remaps non-ascii bytes to ".". One use for this class is to convert raw data read in from a file or the net to a human-readable form, probably for debugging.


Constructor Summary
BytesToString()
           
 
Method Summary
static java.lang.String conv(byte[] b)
          Converts the array of bytes to a string.
static java.lang.String conv(byte[] b, int len)
          Converts the array of bytes to a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BytesToString

public BytesToString()
Method Detail

conv

public static java.lang.String conv(byte[] b)
Converts the array of bytes to a string. Non-ascii characters are converted to ".".


conv

public static java.lang.String conv(byte[] b,
                                    int len)
Converts the array of bytes to a string. Non-ascii characters are converted to ".". Only the first len bytes are used.