@@ -150,7 +150,8 @@ public final class SasFileParser {
150
150
*/
151
151
private byte [] cachedPage ;
152
152
/**
153
- * The type of the current page when reading the file. If it is other than {@link SasFileConstants#PAGE_META_TYPE},
153
+ * The type of the current page when reading the file. If it is other than
154
+ * {@link SasFileConstants#PAGE_META_TYPE_1}, {@link SasFileConstants#PAGE_META_TYPE_1},
154
155
* {@link SasFileConstants#PAGE_MIX_TYPE} and {@link SasFileConstants#PAGE_DATA_TYPE} page is skipped.
155
156
*/
156
157
private int currentPageType ;
@@ -344,17 +345,18 @@ private boolean processSasFilePageMeta() throws IOException {
344
345
int bitOffset = sasFileProperties .isU64 () ? PAGE_BIT_OFFSET_X64 : PAGE_BIT_OFFSET_X86 ;
345
346
readPageHeader ();
346
347
List <SubheaderPointer > subheaderPointers = new ArrayList <SubheaderPointer >();
347
- if (currentPageType == PAGE_META_TYPE || currentPageType == PAGE_MIX_TYPE ) {
348
+ if (currentPageType == PAGE_META_TYPE_1 || currentPageType == PAGE_META_TYPE_2
349
+ || currentPageType == PAGE_MIX_TYPE ) {
348
350
processPageMetadata (bitOffset , subheaderPointers );
349
351
}
350
352
return currentPageType == PAGE_DATA_TYPE || currentPageType == PAGE_MIX_TYPE
351
353
|| currentPageDataSubheaderPointers .size () != 0 ;
352
354
}
353
355
354
356
/**
355
- * The method to parse and read metadata of a page, used for pages of the {@link SasFileConstants#PAGE_META_TYPE }
356
- * and {@link SasFileConstants#PAGE_MIX_TYPE} types. The method goes through subheaders, one by one, and calls
357
- * the processing functions depending on their signatures.
357
+ * The method to parse and read metadata of a page, used for pages of the {@link SasFileConstants#PAGE_META_TYPE_1 }
358
+ * {@link SasFileConstants#PAGE_META_TYPE_1}, and {@link SasFileConstants#PAGE_MIX_TYPE} types. The method goes
359
+ * through subheaders, one by one, and calls the processing functions depending on their signatures.
358
360
*
359
361
* @param bitOffset the offset from the beginning of the page at which the page stores its metadata.
360
362
* @param subheaderPointers the number of subheaders on the page.
@@ -489,7 +491,8 @@ Object[] readNext(List<String> columnNames) throws IOException {
489
491
}
490
492
int bitOffset = sasFileProperties .isU64 () ? PAGE_BIT_OFFSET_X64 : PAGE_BIT_OFFSET_X86 ;
491
493
switch (currentPageType ) {
492
- case PAGE_META_TYPE :
494
+ case PAGE_META_TYPE_1 :
495
+ case PAGE_META_TYPE_2 :
493
496
SubheaderPointer currentSubheaderPointer =
494
497
currentPageDataSubheaderPointers .get (currentRowOnPageIndex ++);
495
498
((ProcessingDataSubheader ) subheaderIndexToClass .get (SubheaderIndexes .DATA_SUBHEADER_INDEX ))
@@ -529,16 +532,17 @@ Object[] readNext(List<String> columnNames) throws IOException {
529
532
530
533
/**
531
534
* The method to read next page from sas7bdat file and put it into {@link SasFileParser#cachedPage}. If this page
532
- * has {@link SasFileConstants#PAGE_META_TYPE} type method process it's subheaders. Method skips page with type
533
- * other than {@link SasFileConstants#PAGE_META_TYPE}, {@link SasFileConstants#PAGE_MIX_TYPE} or
535
+ * has {@link SasFileConstants#PAGE_META_TYPE_1} or {@link SasFileConstants#PAGE_META_TYPE_2} type method process
536
+ * it's subheaders. Method skips page with type other than {@link SasFileConstants#PAGE_META_TYPE_1},
537
+ * {@link SasFileConstants#PAGE_META_TYPE_2}, {@link SasFileConstants#PAGE_MIX_TYPE} or
534
538
* {@link SasFileConstants#PAGE_DATA_TYPE} and reads next.
535
539
*
536
540
* @throws IOException if reading from the {@link SasFileParser#sasFileStream} stream is impossible.
537
541
*/
538
542
private void readNextPage () throws IOException {
539
543
processNextPage ();
540
- while (currentPageType != PAGE_META_TYPE && currentPageType != PAGE_MIX_TYPE
541
- && currentPageType != PAGE_DATA_TYPE ) {
544
+ while (currentPageType != PAGE_META_TYPE_1 && currentPageType != PAGE_META_TYPE_2
545
+ && currentPageType != PAGE_MIX_TYPE && currentPageType != PAGE_DATA_TYPE ) {
542
546
if (eof ) {
543
547
return ;
544
548
}
@@ -562,7 +566,8 @@ private void processNextPage() throws IOException {
562
566
}
563
567
564
568
readPageHeader ();
565
- if (currentPageType == PAGE_META_TYPE || currentPageType == PAGE_AMD_TYPE ) {
569
+ if (currentPageType == PAGE_META_TYPE_1 || currentPageType == PAGE_META_TYPE_2
570
+ || currentPageType == PAGE_AMD_TYPE ) {
566
571
List <SubheaderPointer > subheaderPointers = new ArrayList <SubheaderPointer >();
567
572
processPageMetadata (bitOffset , subheaderPointers );
568
573
if (currentPageType == PAGE_AMD_TYPE ) {
0 commit comments