diff options
author | Dominik Stadler <centic@apache.org> | 2018-02-08 19:34:16 +0000 |
---|---|---|
committer | Dominik Stadler <centic@apache.org> | 2018-02-08 19:34:16 +0000 |
commit | 21e5140462255224d9261a7575e89b35255ec0ac (patch) | |
tree | 1be4e7bc40c56b3219d69c92fbd8499568d079c7 /src/java/org/apache/poi | |
parent | a911347aae82b44d6bf9c894a9846c28f7fb338f (diff) | |
download | poi-21e5140462255224d9261a7575e89b35255ec0ac.tar.gz poi-21e5140462255224d9261a7575e89b35255ec0ac.zip |
Various smaller adjustments: Remove filename in test, remove unused parameters, fix a few simple typos in JavaDoc and add more JavaDoc and some more tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1823595 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/poi')
-rw-r--r-- | src/java/org/apache/poi/ss/usermodel/Sheet.java | 18 | ||||
-rw-r--r-- | src/java/org/apache/poi/util/LittleEndianByteArrayInputStream.java | 53 |
2 files changed, 55 insertions, 16 deletions
diff --git a/src/java/org/apache/poi/ss/usermodel/Sheet.java b/src/java/org/apache/poi/ss/usermodel/Sheet.java index 2d77479677..7e3eb3c574 100644 --- a/src/java/org/apache/poi/ss/usermodel/Sheet.java +++ b/src/java/org/apache/poi/ss/usermodel/Sheet.java @@ -110,7 +110,7 @@ public interface Sheet extends Iterable<Row> { * method will include such rows and thus the returned value might be higher * than expected! * - * @return last row contained n this sheet (0-based) + * @return last row contained on this sheet (0-based) */ int getLastRowNum(); @@ -118,7 +118,7 @@ public interface Sheet extends Iterable<Row> { * Get the visibility state for a given column * * @param columnIndex - the column to get (0-based) - * @param hidden - the visiblity state of the column + * @param hidden - the visibility state of the column */ void setColumnHidden(int columnIndex, boolean hidden); @@ -205,7 +205,7 @@ public interface Sheet extends Iterable<Row> { * <p> * Please note, that this method works correctly only for workbooks * with the default font size (Arial 10pt for .xls and Calibri 11pt for .xlsx). - * If the default font is changed the column width can be streched + * If the default font is changed the column width can be stretched * </p> * * @param columnIndex - the column to set (0-based) @@ -384,7 +384,7 @@ public interface Sheet extends Iterable<Row> { * evaluation in POI is not possible. * </p> * - * To force recalcuation of formulas in the entire workbook + * To force recalculation of formulas in the entire workbook * use {@link Workbook#setForceFormulaRecalculation(boolean)} instead. * * @param value true if the application will perform a full recalculation of @@ -719,7 +719,7 @@ public interface Sheet extends Iterable<Row> { * <p> * If both colSplit and rowSplit are zero then the existing freeze pane is removed * </p> - * @param colSplit Horizonatal position of split. + * @param colSplit Horizontal position of split. * @param rowSplit Vertical position of split. * @param leftmostColumn Left column visible in right pane. * @param topRow Top row visible in bottom pane @@ -731,14 +731,14 @@ public interface Sheet extends Iterable<Row> { * <p> * If both colSplit and rowSplit are zero then the existing freeze pane is removed * </p> - * @param colSplit Horizonatal position of split. + * @param colSplit Horizontal position of split. * @param rowSplit Vertical position of split. */ void createFreezePane(int colSplit, int rowSplit); /** * Creates a split pane. Any existing freezepane or split pane is overwritten. - * @param xSplitPos Horizonatal position of split (in 1/20th of a point). + * @param xSplitPos Horizontal position of split (in 1/20th of a point). * @param ySplitPos Vertical position of split (in 1/20th of a point). * @param topRow Top row visible in bottom pane * @param leftmostColumn Left column visible in right pane. @@ -804,7 +804,7 @@ public interface Sheet extends Iterable<Row> { * Breaks occur above the specified row and left of the specified column inclusive. * * For example, <code>sheet.setColumnBreak(2);</code> breaks the sheet into two parts - * with columns A,B,C in the first and D,E,... in the second. Simuilar, <code>sheet.setRowBreak(2);</code> + * with columns A,B,C in the first and D,E,... in the second. Similar, <code>sheet.setRowBreak(2);</code> * breaks the sheet into two parts with first three rows (rownum=1...3) in the first part * and rows starting with rownum=4 in the second. * @@ -842,7 +842,7 @@ public interface Sheet extends Iterable<Row> { * Breaks occur above the specified row and left of the specified column inclusive. * * For example, <code>sheet.setColumnBreak(2);</code> breaks the sheet into two parts - * with columns A,B,C in the first and D,E,... in the second. Simuilar, <code>sheet.setRowBreak(2);</code> + * with columns A,B,C in the first and D,E,... in the second. Similar, <code>sheet.setRowBreak(2);</code> * breaks the sheet into two parts with first three rows (rownum=1...3) in the first part * and rows starting with rownum=4 in the second. * diff --git a/src/java/org/apache/poi/util/LittleEndianByteArrayInputStream.java b/src/java/org/apache/poi/util/LittleEndianByteArrayInputStream.java index fcb44f653e..0a28333e25 100644 --- a/src/java/org/apache/poi/util/LittleEndianByteArrayInputStream.java +++ b/src/java/org/apache/poi/util/LittleEndianByteArrayInputStream.java @@ -23,16 +23,55 @@ import java.io.ByteArrayInputStream; * Adapts a plain byte array to {@link LittleEndianInput} */ public class LittleEndianByteArrayInputStream extends ByteArrayInputStream implements LittleEndianInput { - public LittleEndianByteArrayInputStream(byte[] buf, int startOffset, int maxReadLen) { // NOSONAR - super(buf, startOffset, maxReadLen); + /** + * Creates <code>LittleEndianByteArrayInputStream</code> + * that uses <code>buf</code> as its + * buffer array. The initial value of <code>pos</code> + * is <code>offset</code> and the initial value + * of <code>count</code> is the minimum of <code>offset+length</code> + * and <code>buf.length</code>. + * The buffer array is not copied. The buffer's mark is + * set to the specified offset. + * + * @param buf the input buffer. + * @param offset the offset in the buffer of the first byte to read. + * @param length the maximum number of bytes to read from the buffer. + */ + public LittleEndianByteArrayInputStream(byte[] buf, int offset, int length) { // NOSONAR + super(buf, offset, length); } - - public LittleEndianByteArrayInputStream(byte[] buf, int startOffset) { - this(buf, startOffset, buf.length - startOffset); + + /** + * Creates <code>LittleEndianByteArrayInputStream</code> + * that uses <code>buf</code> as its + * buffer array. The initial value of <code>pos</code> + * is <code>offset</code> and the initial value + * of <code>count</code> is the minimum of <code>offset+buf.length</code> + * and <code>buf.length</code>. + * The buffer array is not copied. The buffer's mark is + * set to the specified offset. + * + * @param buf the input buffer. + * @param offset the offset in the buffer of the first byte to read. + */ + public LittleEndianByteArrayInputStream(byte[] buf, int offset) { + this(buf, offset, buf.length - offset); } - + + /** + * Creates a <code>LittleEndianByteArrayInputStream</code> + * so that it uses <code>buf</code> as its + * buffer array. + * The buffer array is not copied. + * The initial value of <code>pos</code> + * is <code>0</code> and the initial value + * of <code>count</code> is the length of + * <code>buf</code>. + * + * @param buf the input buffer. + */ public LittleEndianByteArrayInputStream(byte[] buf) { - this(buf, 0); + super(buf); } protected void checkPosition(int i) { |