ch.claudio.fat
Class Util

java.lang.Object
  extended by ch.claudio.fat.Util

public class Util
extends java.lang.Object

Version:
$Id:$
Author:
Claudio Nieder

Copyright (C) 2007 Claudio Nieder <private@claudio.ch>, CH-8610 Uster

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA


Constructor Summary
Util()
           
 
Method Summary
static int get2(byte[] b, int off)
          Get little endian 16 bit value from block
static int get4(byte[] b, int off)
          Get little endian 32 bit value from block
static java.lang.String getAscii(byte[] b, int off, int len)
          Get ASCII string from block
static void main(java.lang.String[] args)
          Print license.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

get2

public static int get2(byte[] b,
                       int off)
Get little endian 16 bit value from block

Parameters:
b - block
off - offset
Returns:
value

get4

public static int get4(byte[] b,
                       int off)
Get little endian 32 bit value from block

Parameters:
b - block
off - offset
Returns:
value

getAscii

public static java.lang.String getAscii(byte[] b,
                                        int off,
                                        int len)
                                 throws java.io.UnsupportedEncodingException
Get ASCII string from block

Parameters:
b - block
off - offset
len - length
Returns:
string
Throws:
java.io.UnsupportedEncodingException

main

public static void main(java.lang.String[] args)
Print license.

Parameters:
args - ignored