|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jaudiotagger.audio.generic.Utils
public class Utils
Contains various frequently used static functions in the different tag formats
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(java.lang.String s,
java.lang.String charSet)
Returns String.getBytes() . |
static java.lang.String |
getExtension(java.io.File f)
|
static long |
getLongNumberBigEndian(java.nio.ByteBuffer b,
int start,
int end)
|
static long |
getLongNumberLittleEndian(java.nio.ByteBuffer b,
int start,
int end)
|
static int |
getNumberBigEndian(byte[] b,
int start,
int end)
|
static int |
getNumberBigEndian(java.nio.ByteBuffer b,
int start,
int end)
|
static int |
getNumberLittleEndian(byte[] b)
|
static int |
getNumberLittleEndian(byte[] b,
int start,
int end)
|
static short |
getShortNumberBigEndian(java.nio.ByteBuffer b,
int start,
int end)
|
static byte[] |
getShortSizeBigEndian(short size)
Convert short to byte representation - Big Endian (as used by mp4) |
static byte[] |
getSizeBigEndian(int size)
Convert int to byte representation - Big Endian (as used by mp4) |
static byte[] |
getSizeLittleEndian(int size)
Convert int to byte representation - Little Endian (as used by ogg vorbis) |
static java.lang.String |
getString(byte[] b,
int offset,
int length,
java.lang.String encoding)
Create String starting from offset upto length using encoding |
static java.lang.String |
getString(java.nio.ByteBuffer buffer,
int offset,
int length,
java.lang.String encoding)
Create String offset from position by offset upto length using encoding, and position of buffer is moved to after position + offset + length |
static byte[] |
getUTF8Bytes(java.lang.String s)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Utils()
Method Detail |
---|
public static void copy(byte[] src, byte[] dst, int dstOffset)
srd
to dst
at the
specified offset.
src
- The byte to be copied.dst
- The array to copy todstOffset
- The start offset for the bytes to be copied.public static byte[] getDefaultBytes(java.lang.String s, java.lang.String charSet)
String.getBytes()
.
s
- The String to call, decode bytes using the specfied charset
public static java.lang.String getExtension(java.io.File f)
public static long getLongNumberLittleEndian(java.nio.ByteBuffer b, int start, int end)
public static long getLongNumberBigEndian(java.nio.ByteBuffer b, int start, int end)
public static int getNumberLittleEndian(byte[] b)
public static int getNumberLittleEndian(byte[] b, int start, int end)
public static int getNumberBigEndian(byte[] b, int start, int end)
public static int getNumberBigEndian(java.nio.ByteBuffer b, int start, int end)
public static short getShortNumberBigEndian(java.nio.ByteBuffer b, int start, int end)
public static byte[] getSizeBigEndian(int size)
size
-
public static byte[] getShortSizeBigEndian(short size)
size
-
public static byte[] getSizeLittleEndian(int size)
size
-
public static java.lang.String getString(byte[] b, int offset, int length, java.lang.String encoding)
b
- offset
- length
- encoding
-
java.io.UnsupportedEncodingException
public static java.lang.String getString(java.nio.ByteBuffer buffer, int offset, int length, java.lang.String encoding)
buffer
- offset
- length
- encoding
-
public static byte[] getUTF8Bytes(java.lang.String s) throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |