diff options
Diffstat (limited to 'src/java/org/apache/poi/ss')
-rw-r--r-- | src/java/org/apache/poi/ss/util/CellRangeAddressList.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/java/org/apache/poi/ss/util/CellRangeAddressList.java b/src/java/org/apache/poi/ss/util/CellRangeAddressList.java index 8773c34eec..72b5882488 100644 --- a/src/java/org/apache/poi/ss/util/CellRangeAddressList.java +++ b/src/java/org/apache/poi/ss/util/CellRangeAddressList.java @@ -99,7 +99,14 @@ public class CellRangeAddressList { } public int getSize() { - return 2 + CellRangeAddress.getEncodedSize(_list.size()); + return getEncodedSize(_list.size()); + } + /** + * @return the total size of for the specified number of ranges, + * including the initial 2 byte range count + */ + public static int getEncodedSize(int numberOfRanges) { + return 2 + CellRangeAddress.getEncodedSize(numberOfRanges); } public int serialize(int offset, byte[] data) { |