src/main/java/com/allantaborda/ooogg/spi/OggAudioInputStream.java
private void init(boolean searchForNextPage) throws StreamCorruptedException, IOException{
		queue = new ArrayDeque<>(120);
		OggPage[] pages = OggUtils.readOggPages(is, searchForNextPage);
		while(pages[0].getGranulePosition() < 1L){
			if(headerPages == null) headerPages = pages;
			else{
				OggPage[] hp = headerPages;
				headerPages = new OggPage[hp.length + pages.length];
				System.arraycopy(hp, 0, headerPages, 0, hp.length);
				System.arraycopy(pages, 0, headerPages, hp.length, pages.length);
			}
			pages = OggUtils.readOggPages(is);
		}
		for(OggPacket p : OggUtils.getPacketsFromPages(pages)) queue.offer(p);
	}
/**
	 * Initializes the OGG packet queue.
	 * @param searchForNextPage If {@code true}, the next OGG page is searched in stream if file pointer does not point to the beginning of OGG magic number.
	 * If {@code false}, it assumes that file pointer already points to the beginning of the OGG magic number, throwing {@code StreamCorruptedException} otherwise.
	 * @throws StreamCorruptedException If OGG structure is corrupted or data structure is not an OGG container.
	 * @throws IOException If I/O error occurs.
	 */
Initializes the OGG packet queue.
@param searchForNextPage If  true, the next OGG page is searched in stream if file pointer does not point to the beginning of OGG magic number.
If  false, it assumes that file pointer already points to the beginning of the OGG magic number, throwing  StreamCorruptedException otherwise.
@throws StreamCorruptedException If OGG structure is corrupted or data structure is not an OGG container.
@throws IOException If I/O error occurs.
Initializes the OGG packet queue . @param searchForNextPage If true the next OGG page is searched in stream if file pointer does not point to the beginning of OGG magic number . If false it assumes that file pointer already points to the beginning of the OGG magic number throwing StreamCorruptedException otherwise . @throws StreamCorruptedException If OGG structure is corrupted or data structure is not an OGG container . @throws IOException If I / O error occurs .
private void init(boolean searchForNextPage) throws StreamCorruptedException, IOException{
		queue = new ArrayDeque<>(120);
		OggPage[] pages = OggUtils.readOggPages(is, searchForNextPage);
		while(pages[0].getGranulePosition() < 1L){
			if(headerPages == null) headerPages = pages;
			else{
				OggPage[] hp = headerPages;
				headerPages = new OggPage[hp.length + pages.length];
				System.arraycopy(hp, 0, headerPages, 0, hp.length);
				System.arraycopy(pages, 0, headerPages, hp.length, pages.length);
			}
			pages = OggUtils.readOggPages(is);
		}
		for(OggPacket p : OggUtils.getPacketsFromPages(pages)) queue.offer(p);
	}
private void init ( boolean searchForNextPage ) throws StreamCorruptedException , IOException { queue = new ArrayDeque < > ( 120 ) ; OggPage [ ] pages = OggUtils . readOggPages ( is , searchForNextPage ) ; while ( pages [ 0 ] . getGranulePosition ( ) < 1L ) { if ( headerPages == null ) headerPages = pages ; else { OggPage [ ] hp = headerPages ; headerPages = new OggPage [ hp . length + pages . length ] ; System . arraycopy ( hp , 0 , headerPages , 0 , hp . length ) ; System . arraycopy ( pages , 0 , headerPages , hp . length , pages . length ) ; } pages = OggUtils . readOggPages ( is ) ; } for ( OggPacket p : OggUtils . getPacketsFromPages ( pages ) ) queue . offer ( p ) ; }
Initializes the OGG packet queue.
Initializes the OGG packet queue .