entagged.audioformats.generic
Class Utils
java.lang.Object
entagged.audioformats.generic.Utils
public class Utils
- extends Object
Contains various frequently used static functions in the different tag
formats
- Author:
- Raphael Slinckx
Constructor Summary |
Utils()
|
Method Summary |
static void |
copy(byte[] src,
byte[] dst,
int dstOffset)
Copies the bytes of srd to dst at the
specified offset. |
static byte[] |
getDefaultBytes(String s)
Returns String.getBytes() .
|
static String |
getExtension(File f)
|
static long |
getLongNumber(byte[] b,
int start,
int end)
|
static long |
getLongNumberBigEndian(byte[] b,
int start,
int end)
|
static int |
getNumber(byte[] b,
int start,
int end)
|
static int |
getNumberBigEndian(byte[] b,
int start,
int end)
|
static byte[] |
getSizeBigEndian(int size)
|
static String |
getString(byte[] b,
int offset,
int length)
|
static String |
getString(byte[] b,
int offset,
int length,
String encoding)
|
static byte[] |
getUTF8Bytes(String s)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Utils
public Utils()
copy
public static void copy(byte[] src,
byte[] dst,
int dstOffset)
- Copies the bytes of
srd
to dst
at the
specified offset.
- Parameters:
src
- The byte do be copied.dst
- The array to copy todstOffset
- The start offset for the bytes to be copied.
getDefaultBytes
public static byte[] getDefaultBytes(String s)
- Returns
String.getBytes()
.
- Parameters:
s
- The String to call.
- Returns:
- The bytes.
getExtension
public static String getExtension(File f)
getLongNumber
public static long getLongNumber(byte[] b,
int start,
int end)
getLongNumberBigEndian
public static long getLongNumberBigEndian(byte[] b,
int start,
int end)
getNumber
public static int getNumber(byte[] b,
int start,
int end)
getNumberBigEndian
public static int getNumberBigEndian(byte[] b,
int start,
int end)
getSizeBigEndian
public static byte[] getSizeBigEndian(int size)
getString
public static String getString(byte[] b,
int offset,
int length)
getString
public static String getString(byte[] b,
int offset,
int length,
String encoding)
throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
getUTF8Bytes
public static byte[] getUTF8Bytes(String s)
throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
Copyright © 2007-2008. All Rights Reserved.