C# Класс javazoom.jl.decoder.Bitstream

The Bistream class is responsible for parsing an MPEG audio bitstream. * REVIEW: much of the parsing currently occurs in the various decoders. This should be moved into this class and associated inner classes.
Наследование: BitstreamErrors
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
close ( ) : void
closeFrame ( ) : void
get_bits ( int number_of_bits ) : int

Read bits from buffer into the lower bits of an unsigned int. The LSB contains the latest read bit of the stream. (1 <= number_of_bits <= 16)

isSyncCurrentPosition ( int syncmode ) : bool

Determines if the next 4 bytes of the stream represent a frame header.

isSyncMark ( int headerstring, int syncmode, int word ) : bool
readBits ( int n ) : int
readCheckedBits ( int n ) : int
unreadFrame ( ) : void

Unreads the bytes read from the frame. @throws BitstreamException

Защищенные методы

Метод Описание
newBitstreamException ( int errorcode ) : BitstreamException
newBitstreamException ( int errorcode, System throwable ) : BitstreamException

Приватные методы

Метод Описание
Bitstream ( BackStream in_Renamed ) : System

Construct a IBitstream that reads data from a given InputStream. *

InitBlock ( ) : void
nextFrame ( ) : void

*

parse_frame ( ) : void

Parses the data previously read with read_frame_data().

readBytes ( sbyte b, int offs, int len ) : int

Simlar to readFully, but doesn't throw exception when EOF is reached.

readFrame ( ) : Header

Reads and parses the next frame from the input source.

readFully ( sbyte b, int offs, int len ) : void

Reads the exact number of bytes from the source input stream into a byte array. *

readNextFrame ( ) : Header
read_frame_data ( int bytesize ) : void

Reads the data for the next frame. The frame is not parsed until parse frame is called.

set_syncword ( int syncword0 ) : void

Set the word we want to sync the header to. In Big-Endian byte order

syncHeader ( sbyte syncmode ) : int

Get next 32 bits from bitstream. They are stored in the headerstring. syncmod allows Synchro flag ID The returned value is False at the end of stream.

Описание методов

close() публичный Метод

public close ( ) : void
Результат void

closeFrame() публичный Метод

public closeFrame ( ) : void
Результат void

get_bits() публичный Метод

Read bits from buffer into the lower bits of an unsigned int. The LSB contains the latest read bit of the stream. (1 <= number_of_bits <= 16)
public get_bits ( int number_of_bits ) : int
number_of_bits int
Результат int

isSyncCurrentPosition() публичный Метод

Determines if the next 4 bytes of the stream represent a frame header.
public isSyncCurrentPosition ( int syncmode ) : bool
syncmode int
Результат bool

isSyncMark() публичный Метод

public isSyncMark ( int headerstring, int syncmode, int word ) : bool
headerstring int
syncmode int
word int
Результат bool

newBitstreamException() защищенный Метод

protected newBitstreamException ( int errorcode ) : BitstreamException
errorcode int
Результат BitstreamException

newBitstreamException() защищенный Метод

protected newBitstreamException ( int errorcode, System throwable ) : BitstreamException
errorcode int
throwable System
Результат BitstreamException

readBits() публичный Метод

public readBits ( int n ) : int
n int
Результат int

readCheckedBits() публичный Метод

public readCheckedBits ( int n ) : int
n int
Результат int

unreadFrame() публичный Метод

Unreads the bytes read from the frame. @throws BitstreamException
public unreadFrame ( ) : void
Результат void