Skip to content

Commit

Permalink
[bug-66257] javadoc
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903985 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
pjfanning committed Sep 10, 2022
1 parent a6efe29 commit cbe165a
Showing 1 changed file with 13 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,21 @@ public class XSSFBReader extends XSSFReader {
private static final Logger LOGGER = LogManager.getLogger(XSSFBReader.class);
private static final Set<String> WORKSHEET_RELS =
Collections.unmodifiableSet(new HashSet<>(
Arrays.asList(new String[]{
Arrays.asList(
XSSFRelation.WORKSHEET.getRelation(),
XSSFRelation.CHARTSHEET.getRelation(),
XSSFRelation.MACRO_SHEET_BIN.getRelation(),
XSSFRelation.INTL_MACRO_SHEET_BIN.getRelation(),
XSSFRelation.DIALOG_SHEET_BIN.getRelation()
})
)
));

/**
* Creates a new XSSFReader, for the given package
*
* @param pkg opc package
* @throws OpenXML4JException if the package data format is invalid
* @throws IOException if there is an I/O issue reading the data
*/
public XSSFBReader(OPCPackage pkg) throws IOException, OpenXML4JException {
super(pkg);
Expand Down Expand Up @@ -101,6 +103,10 @@ public String getAbsPathMetadata() throws IOException {
* Each sheet's InputStream is only opened when fetched
* from the Iterator. It's up to you to close the
* InputStreams when done with each one.
*
* @return iterator of {@link InputStream}s
* @throws InvalidFormatException if the sheet data format is invalid
* @throws IOException if there is an I/O issue reading the data
*/
@Override
public Iterator<InputStream> getSheetsData() throws IOException, InvalidFormatException {
Expand All @@ -123,8 +129,10 @@ public static class SheetIterator extends XSSFReader.SheetIterator {
* Construct a new SheetIterator
*
* @param wb package part holding workbook.xml
* @throws InvalidFormatException if the sheet data format is invalid
* @throws IOException if there is an I/O issue reading the data
*/
private SheetIterator(PackagePart wb) throws IOException {
private SheetIterator(PackagePart wb) throws IOException, InvalidFormatException {
super(wb);
}

Expand Down Expand Up @@ -180,7 +188,7 @@ public XSSFBCommentsTable getXSSFBSheetComments() {


private static class PathExtractor extends XSSFBParser {
private static SparseBitSet RECORDS = new SparseBitSet();
private static final SparseBitSet RECORDS = new SparseBitSet();
static {
RECORDS.set(XSSFBRecordType.BrtAbsPath15.getId());
}
Expand Down Expand Up @@ -277,10 +285,7 @@ private boolean tryOldFormat(byte[] data) throws XSSFBParseException {
if (StringUtil.isNotBlank(relId)) {
sheets.add(new XSSFSheetRef(relId, name));
}
if (offset == data.length) {
return true;
}
return false;
return offset == data.length;
}

List<XSSFSheetRef> getSheets() {
Expand Down

0 comments on commit cbe165a

Please sign in to comment.