@@ -78,12 +78,13 @@ public Base64InputStream(InputStream in, boolean doEncode) {
7878 * @param doEncode true if we should encode all data read from us,
7979 * false if we should decode.
8080 * @param lineLength If doEncode is true, each line of encoded
81- * data will contain lineLength characters. If
82- * doEncode is false, lineLength is ignored.
81+ * data will contain lineLength characters.
82+ * If lineLength <=0, the encoded data is not divided into lines.
83+ * If doEncode is false, lineLength is ignored.
8384 * @param lineSeparator If doEncode is true, each line of encoded
84- * data will be terminated with this byte sequence
85- * (e.g. \r\n). If doEncode is false lineSeparator
86- * is ignored.
85+ * data will be terminated with this byte sequence (e.g. \r\n).
86+ * If lineLength <= 0, the lineSeparator is not used.
87+ * If doEncode is false lineSeparator is ignored.
8788 */
8889 public Base64InputStream (InputStream in , boolean doEncode , int lineLength , byte [] lineSeparator ) {
8990 super (in );
@@ -93,6 +94,8 @@ public Base64InputStream(InputStream in, boolean doEncode, int lineLength, byte[
9394
9495 /**
9596 * Reads one <code>byte</code> from this input stream.
97+ *
98+ * @return the byte as an integer in the range 0 to 255
9699 * Returns -1 if EOF has been reached.
97100 */
98101 public int read () throws IOException {
@@ -111,8 +114,15 @@ public int read() throws IOException {
111114 * Attempts to read <code>len</code> bytes into the specified
112115 * <code>b</code> array starting at <code>offset</code> from
113116 * this InputStream.
114- *
117+ *
118+ * @param b destination byte array
119+ * @param offset where to start writing the bytes
120+ * @param len maximum number of bytes to read
121+ *
122+ * @return number of bytes read
115123 * @throws IOException if an I/O error occurs.
124+ * @throws NullPointerException if the byte array parameter is null
125+ * @throws IndexOutOfBoundsException if offset, len or buffer size are invalid
116126 */
117127 public int read (byte b [], int offset , int len ) throws IOException {
118128 if (b == null ) {
0 commit comments