public static class MP3ElementaryInputStream.Frame
extends java.lang.Object
Constructor and Description |
---|
Frame(int header)
Creates a new frame.
|
Modifier and Type | Method and Description |
---|---|
int |
getBitRate()
Returns the bitrate of the frame.
|
int |
getBitRateCode()
Returns the raw bitrate code as it is stored in the header.
|
long |
getBodyOffset()
Returns the offset of the frame body in the input stream.
|
int |
getBodySize()
Returns the size of the frame body in bytes.
|
int |
getChannelCount()
Returns the number of channels.
|
int |
getChannelModeCode()
Returns the raw channel mode code as stored in the header.
|
int |
getCRC()
Returns the CRC of this frame.
|
long |
getFrameOffset()
Returns the offset of the frame in the input stream.
|
int |
getFrameSize()
Returns the size of the frame in bytes.
|
int |
getHeaderCode()
Returns the raw 32-bit header code as it is stored in the file.
|
long |
getHeaderOffset()
Returns the offset of the header in the input stream.
|
int |
getHeaderSize()
Returns the size of the header in bytes.
|
int |
getLayer()
Returns the layer number.
|
int |
getLayerCode()
Returns the raw layer code as it is stored in the header.
|
int |
getPaddingSize()
Padding is used to fit the bit rates exactly.
|
int |
getSampleCount()
Returns the number of samples in the frame.
|
int |
getSampleRate()
Returns the sample rate in Hz.
|
int |
getSampleRateCode()
Returns the raw sample rate code as it is stored in the header.
|
int |
getSampleSize()
Returns the sample size in bits.
|
long |
getSideInfoOffset()
Returns the offset of the side info in the input stream.
|
int |
getSideInfoSize()
Returns the size of the side info in bytes.
|
int |
getVersion()
Returns the version number: 1=MPEG 1, 2=MPEG 2, 25=MPEG 2.5; -1=unknown.
|
int |
getVersionCode()
Returns the version code as it is stored in the
header.
|
boolean |
hasCRC()
Returns true if this frame has a CRC.
|
boolean |
hasPadding() |
byte[] |
headerToByteArray()
Returns the frame header as a byte array.
|
int |
headerToByteArray(byte[] data,
int offset)
Writes the frame header into the specified byte array.
|
void |
writeHeader(java.io.OutputStream out)
Writes the frame header into the specified output stream.
|
public Frame(int header)
header
- The 32-bit Frame headerpublic int getHeaderCode()
public int getVersion()
public int getVersionCode()
public int getLayer()
public int getLayerCode()
public int getBitRate()
public int getBitRateCode()
public boolean hasCRC()
public int getCRC()
public boolean hasPadding()
public int getSampleRate()
public int getSampleRateCode()
public int getSampleCount()
public int getChannelCount()
public int getSampleSize()
public int getChannelModeCode()
public byte[] headerToByteArray()
public int headerToByteArray(byte[] data, int offset)
public void writeHeader(java.io.OutputStream out) throws java.io.IOException
java.io.IOException
public long getFrameOffset()
public int getFrameSize()
public long getHeaderOffset()
public int getHeaderSize()
public long getSideInfoOffset()
public int getSideInfoSize()
public long getBodyOffset()
public int getBodySize()
public int getPaddingSize()