com.flazr.util
Class Utils

java.lang.Object
  extended by com.flazr.util.Utils

public class Utils
extends Object


Method Summary
static byte[] fromHex(char[] hex)
           
static byte[] fromHex(String s)
           
static String getOverHttp(String url)
           
static void printlnCopyrightNotice()
           
static byte[] readAsByteArray(File file)
           
static byte[] readAsByteArray(File file, long length)
           
static byte[] readAsByteArray(String fileName)
           
static byte[] readAsByteArray(String fileName, int length)
           
static CharSequence readAsString(File file)
           
static CharSequence readAsString(String fileName)
           
static int readInt32Reverse(org.jboss.netty.buffer.ChannelBuffer in)
           
static void sendStopSignal(int port)
           
static byte[] sha256(byte[] message, byte[] key)
           
static String toHex(byte b)
           
static String toHex(byte[] ba)
           
static String toHex(byte[] ba, boolean withSeparator)
           
static String toHex(byte[] ba, int offset, int length, boolean withSeparator)
           
static byte[] toInt24(int value)
           
static String trimSlashes(String raw)
           
static void writeInt32Reverse(org.jboss.netty.buffer.ChannelBuffer out, int value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

toHex

public static String toHex(byte[] ba)

toHex

public static String toHex(byte[] ba,
                           boolean withSeparator)

toHex

public static String toHex(byte[] ba,
                           int offset,
                           int length,
                           boolean withSeparator)

toHex

public static String toHex(byte b)

fromHex

public static byte[] fromHex(char[] hex)

fromHex

public static byte[] fromHex(String s)

toInt24

public static byte[] toInt24(int value)

readInt32Reverse

public static int readInt32Reverse(org.jboss.netty.buffer.ChannelBuffer in)

writeInt32Reverse

public static void writeInt32Reverse(org.jboss.netty.buffer.ChannelBuffer out,
                                     int value)

readAsString

public static CharSequence readAsString(String fileName)

readAsString

public static CharSequence readAsString(File file)

readAsByteArray

public static byte[] readAsByteArray(String fileName)

readAsByteArray

public static byte[] readAsByteArray(String fileName,
                                     int length)

readAsByteArray

public static byte[] readAsByteArray(File file)

readAsByteArray

public static byte[] readAsByteArray(File file,
                                     long length)

getOverHttp

public static String getOverHttp(String url)

sha256

public static byte[] sha256(byte[] message,
                            byte[] key)

sendStopSignal

public static void sendStopSignal(int port)

printlnCopyrightNotice

public static void printlnCopyrightNotice()

trimSlashes

public static String trimSlashes(String raw)


Copyright © 2011. All Rights Reserved.