/** * @param DvrFile poFile * @param OutputStream poWrite Lese Datenströme im Single File Streaming Format mit statischer * Chunk größe * @throws InterruptedException */ private void readstream_singlepart(BufferedOutputStream poWrite) throws IOException, InterruptedException { int lnChunkSize = 0, lnBytes = 0; byte[] laBuffer = null; byte lbRead = 0; int lnUnknown = readint(); int lnFileSize = readint(); int lnReadSize = 0; lnChunkSize = readint(); laBuffer = new byte[lnChunkSize]; do { lbRead = readbyte(); if (lbRead >= 0) { readskip(3); lnReadSize = lnFileSize - lnBytes > lnChunkSize ? lnChunkSize : lnFileSize - lnBytes; readbyte(laBuffer, 0, lnReadSize); poWrite.write(laBuffer, 0, lnReadSize); lnBytes += lnChunkSize; } else resumeread(lbRead); } while (lnBytes < lnFileSize); readbyte(laBuffer, 0, lnChunkSize - lnReadSize); poWrite.close(); }