protected BitstreamException newBitstreamException(int errorcode) { return new BitstreamException(errorcode, null); } protected BitstreamException newBitstreamException(int errorcode, Throwable throwable)
protected BitstreamException newBitstreamException(int errorcode, Throwable throwable) { return new BitstreamException(errorcode, throwable); }
protected BitstreamException newBitstreamException(int errorcode, Throwable throwable) { return new BitstreamException(errorcode, throwable); }
protected BitstreamException newBitstreamException(int errorcode) { return new BitstreamException(errorcode, null); } protected BitstreamException newBitstreamException(int errorcode, Throwable throwable)
protected BitstreamException newBitstreamException(int errorcode) { return new BitstreamException(errorcode, null); } protected BitstreamException newBitstreamException(int errorcode, Throwable throwable)
protected BitstreamException newBitstreamException(int errorcode) { return new BitstreamException(errorcode, null); }
protected BitstreamException newBitstreamException (int errorcode, Throwable throwable) { return new BitstreamException(errorcode, throwable); }
protected BitstreamException newBitstreamException(int errorcode, Throwable throwable) { return new BitstreamException(errorcode, throwable); }
protected BitstreamException newBitstreamException(int errorcode, Throwable throwable) { return new BitstreamException(errorcode, throwable); }
protected BitstreamException newBitstreamException (int errorcode) { return new BitstreamException(errorcode, null); }
/** * Simlar to readFully, but doesn't throw exception when * EOF is reached. */ private int readBytes(byte[] b, int offs, int len) throws BitstreamException { int totalBytesRead = 0; try { while (len > 0) { int bytesread = source.read(b, offs, len); if (bytesread == -1) { break; } totalBytesRead += bytesread; offs += bytesread; len -= bytesread; } } catch (IOException ex) { throw new BitstreamException(STREAM_ERROR, ex); } return totalBytesRead; }
/** * 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. */ public int syncHeader(byte syncmode) throws BitstreamException { boolean sync; int headerstring; // read additional 2 bytes int bytesRead = readBytes(syncbuf, 0, 3); if (bytesRead != 3) throw new BitstreamException(STREAM_EOF, null); headerstring = ((syncbuf[0] << 16) & 0x00FF0000) | ((syncbuf[1] << 8) & 0x0000FF00) | ((syncbuf[2]) & 0x000000FF); do { headerstring <<= 8; if (readBytes(syncbuf, 3, 1) != 1) throw new BitstreamException(STREAM_EOF, null); headerstring |= (syncbuf[3] & 0x000000FF); sync = isSyncMark(headerstring, syncmode, syncword); } while (!sync); return headerstring; }
throw new BitstreamException("XingVBRHeader Corrupted", e); throw new BitstreamException("VBRIVBRHeader Corrupted", e);
throw new BitstreamException("XingVBRHeader Corrupted",e); throw new BitstreamException("VBRIVBRHeader Corrupted",e);
throw new BitstreamException("XingVBRHeader Corrupted",e); throw new BitstreamException("VBRIVBRHeader Corrupted",e);
throw new BitstreamException("XingVBRHeader Corrupted",e); throw new BitstreamException("VBRIVBRHeader Corrupted",e);
throw new BitstreamException("XingVBRHeader Corrupted", e); throw new BitstreamException("VBRIVBRHeader Corrupted", e);