aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/poi/util
diff options
context:
space:
mode:
authorDominik Stadler <centic@apache.org>2018-02-08 19:34:16 +0000
committerDominik Stadler <centic@apache.org>2018-02-08 19:34:16 +0000
commit21e5140462255224d9261a7575e89b35255ec0ac (patch)
tree1be4e7bc40c56b3219d69c92fbd8499568d079c7 /src/java/org/apache/poi/util
parenta911347aae82b44d6bf9c894a9846c28f7fb338f (diff)
downloadpoi-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/util')
-rw-r--r--src/java/org/apache/poi/util/LittleEndianByteArrayInputStream.java53
1 files changed, 46 insertions, 7 deletions
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) {