Reformat javadoc

This commit is contained in:
AsamK 2015-07-07 12:31:20 +02:00
parent 1b0df2c7e7
commit 6af605f790
3 changed files with 37 additions and 37 deletions

View file

@ -3,34 +3,34 @@ package cli;
/** /**
* <p>Encodes and decodes to and from Base64 notation.</p> * <p>Encodes and decodes to and from Base64 notation.</p>
* <p>Homepage: <a href="http://iharder.net/base64">http://iharder.net/base64</a>.</p> * <p>Homepage: <a href="http://iharder.net/base64">http://iharder.net/base64</a>.</p>
* <p/> *
* <p>Example:</p> * <p>Example:</p>
* <p/> *
* <code>String encoded = Base64.encode( myByteArray );</code> * <code>String encoded = Base64.encode( myByteArray );</code>
* <br /> * <br />
* <code>byte[] myByteArray = Base64.decode( encoded );</code> * <code>byte[] myByteArray = Base64.decode( encoded );</code>
* <p/> *
* <p>The <tt>options</tt> parameter, which appears in a few places, is used to pass * <p>The <tt>options</tt> parameter, which appears in a few places, is used to pass
* several pieces of information to the encoder. In the "higher level" methods such as * several pieces of information to the encoder. In the "higher level" methods such as
* encodeBytes( bytes, options ) the options parameter can be used to indicate such * encodeBytes( bytes, options ) the options parameter can be used to indicate such
* things as first gzipping the bytes before encoding them, not inserting linefeeds, * things as first gzipping the bytes before encoding them, not inserting linefeeds,
* and encoding using the URL-safe and Ordered dialects.</p> * and encoding using the URL-safe and Ordered dialects.</p>
* <p/> *
* <p>Note, according to <a href="http://www.faqs.org/rfcs/rfc3548.html">RFC3548</a>, * <p>Note, according to <a href="http://www.faqs.org/rfcs/rfc3548.html">RFC3548</a>,
* Section 2.1, implementations should not add line feeds unless explicitly told * Section 2.1, implementations should not add line feeds unless explicitly told
* to do so. I've got Base64 set to this behavior now, although earlier versions * to do so. I've got Base64 set to this behavior now, although earlier versions
* broke lines by default.</p> * broke lines by default.</p>
* <p/> *
* <p>The constants defined in Base64 can be OR-ed together to combine options, so you * <p>The constants defined in Base64 can be OR-ed together to combine options, so you
* might make a call like this:</p> * might make a call like this:</p>
* <p/> *
* <code>String encoded = Base64.encodeBytes( mybytes, Base64.GZIP | Base64.DO_BREAK_LINES );</code> * <code>String encoded = Base64.encodeBytes( mybytes, Base64.GZIP | Base64.DO_BREAK_LINES );</code>
* <p>to compress the data before encoding it and then making the output have newline characters.</p> * <p>to compress the data before encoding it and then making the output have newline characters.</p>
* <p>Also...</p> * <p>Also...</p>
* <code>String encoded = Base64.encodeBytes( crazyString.getBytes() );</code> * <code>String encoded = Base64.encodeBytes( crazyString.getBytes() );</code>
* <p/> *
* <p/> *
* <p/> *
* <p> * <p>
* Change Log: * Change Log:
* </p> * </p>
@ -95,7 +95,7 @@ package cli;
* Special thanks to Jim Kellerman at <a href="http://www.powerset.com/">http://www.powerset.com/</a> * Special thanks to Jim Kellerman at <a href="http://www.powerset.com/">http://www.powerset.com/</a>
* for contributing the new Base64 dialects. * for contributing the new Base64 dialects.
* </li> * </li>
* <p/> *
* <li>v2.1 - Cleaned up javadoc comments and unused variables and methods. Added * <li>v2.1 - Cleaned up javadoc comments and unused variables and methods. Added
* some convenience methods for reading and writing to and from files.</li> * some convenience methods for reading and writing to and from files.</li>
* <li>v2.0.2 - Now specifies UTF-8 encoding in places where the code fails on systems * <li>v2.0.2 - Now specifies UTF-8 encoding in places where the code fails on systems
@ -123,7 +123,7 @@ package cli;
* <li>v1.3.4 - Fixed when "improperly padded stream" error was thrown at the wrong time.</li> * <li>v1.3.4 - Fixed when "improperly padded stream" error was thrown at the wrong time.</li>
* <li>v1.3.3 - Fixed I/O streams which were totally messed up.</li> * <li>v1.3.3 - Fixed I/O streams which were totally messed up.</li>
* </ul> * </ul>
* <p/> *
* <p> * <p>
* I am placing this code in the Public Domain. Do with it as you will. * I am placing this code in the Public Domain. Do with it as you will.
* This software comes with no guarantees or warranties but with * This software comes with no guarantees or warranties but with
@ -619,13 +619,13 @@ public class Base64 {
/** /**
* Serializes an object and returns the Base64-encoded * Serializes an object and returns the Base64-encoded
* version of that serialized object. * version of that serialized object.
* <p/> *
* <p>As of v 2.3, if the object * <p>As of v 2.3, if the object
* cannot be serialized or there is another error, * cannot be serialized or there is another error,
* the method will throw an java.io.IOException. <b>This is new to v2.3!</b> * the method will throw an java.io.IOException. <b>This is new to v2.3!</b>
* In earlier versions, it just returned a null value, but * In earlier versions, it just returned a null value, but
* in retrospect that's a pretty poor way to handle it.</p> * in retrospect that's a pretty poor way to handle it.</p>
* <p> *
* The object is not GZip-compressed before being encoded. * The object is not GZip-compressed before being encoded.
* *
* @param serializableObject The object to encode * @param serializableObject The object to encode
@ -643,22 +643,22 @@ public class Base64 {
/** /**
* Serializes an object and returns the Base64-encoded * Serializes an object and returns the Base64-encoded
* version of that serialized object. * version of that serialized object.
* <p/> *
* <p>As of v 2.3, if the object * <p>As of v 2.3, if the object
* cannot be serialized or there is another error, * cannot be serialized or there is another error,
* the method will throw an java.io.IOException. <b>This is new to v2.3!</b> * the method will throw an java.io.IOException. <b>This is new to v2.3!</b>
* In earlier versions, it just returned a null value, but * In earlier versions, it just returned a null value, but
* in retrospect that's a pretty poor way to handle it.</p> * in retrospect that's a pretty poor way to handle it.</p>
* <p> *
* The object is not GZip-compressed before being encoded. * The object is not GZip-compressed before being encoded.
* <p> *
* Example options:<pre> * Example options:<pre>
* GZIP: gzip-compresses object before encoding it. * GZIP: gzip-compresses object before encoding it.
* DO_BREAK_LINES: break lines at 76 characters * DO_BREAK_LINES: break lines at 76 characters
* </pre> * </pre>
* <p> *
* Example: <code>encodeObject( myObj, Base64.GZIP )</code> or * Example: <code>encodeObject( myObj, Base64.GZIP )</code> or
* <p> *
* Example: <code>encodeObject( myObj, Base64.GZIP | Base64.DO_BREAK_LINES )</code> * Example: <code>encodeObject( myObj, Base64.GZIP | Base64.DO_BREAK_LINES )</code>
* *
* @param serializableObject The object to encode * @param serializableObject The object to encode
@ -793,8 +793,8 @@ public class Base64 {
* Example: <code>encodeBytes( myData, Base64.GZIP )</code> or * Example: <code>encodeBytes( myData, Base64.GZIP )</code> or
* <p> * <p>
* Example: <code>encodeBytes( myData, Base64.GZIP | Base64.DO_BREAK_LINES )</code> * Example: <code>encodeBytes( myData, Base64.GZIP | Base64.DO_BREAK_LINES )</code>
* <p/> *
* <p/> *
* <p>As of v 2.3, if there is an error with the GZIP stream, * <p>As of v 2.3, if there is an error with the GZIP stream,
* the method will throw an java.io.IOException. <b>This is new to v2.3!</b> * the method will throw an java.io.IOException. <b>This is new to v2.3!</b>
* In earlier versions, it just returned a null value, but * In earlier versions, it just returned a null value, but
@ -817,7 +817,7 @@ public class Base64 {
/** /**
* Encodes a byte array into Base64 notation. * Encodes a byte array into Base64 notation.
* Does not GZip-compress data. * Does not GZip-compress data.
* <p/> *
* <p>As of v 2.3, if there is an error, * <p>As of v 2.3, if there is an error,
* the method will throw an java.io.IOException. <b>This is new to v2.3!</b> * the method will throw an java.io.IOException. <b>This is new to v2.3!</b>
* In earlier versions, it just returned a null value, but * In earlier versions, it just returned a null value, but
@ -858,8 +858,8 @@ public class Base64 {
* Example: <code>encodeBytes( myData, Base64.GZIP )</code> or * Example: <code>encodeBytes( myData, Base64.GZIP )</code> or
* <p> * <p>
* Example: <code>encodeBytes( myData, Base64.GZIP | Base64.DO_BREAK_LINES )</code> * Example: <code>encodeBytes( myData, Base64.GZIP | Base64.DO_BREAK_LINES )</code>
* <p/> *
* <p/> *
* <p>As of v 2.3, if there is an error with the GZIP stream, * <p>As of v 2.3, if there is an error with the GZIP stream,
* the method will throw an java.io.IOException. <b>This is new to v2.3!</b> * the method will throw an java.io.IOException. <b>This is new to v2.3!</b>
* In earlier versions, it just returned a null value, but * In earlier versions, it just returned a null value, but
@ -1455,7 +1455,7 @@ public class Base64 {
/** /**
* Convenience method for encoding data to a file. * Convenience method for encoding data to a file.
* <p/> *
* <p>As of v 2.3, if there is a error, * <p>As of v 2.3, if there is a error,
* the method will throw an java.io.IOException. <b>This is new to v2.3!</b> * the method will throw an java.io.IOException. <b>This is new to v2.3!</b>
* In earlier versions, it just returned false, but * In earlier versions, it just returned false, but
@ -1495,7 +1495,7 @@ public class Base64 {
/** /**
* Convenience method for decoding data to a file. * Convenience method for decoding data to a file.
* <p/> *
* <p>As of v 2.3, if there is a error, * <p>As of v 2.3, if there is a error,
* the method will throw an java.io.IOException. <b>This is new to v2.3!</b> * the method will throw an java.io.IOException. <b>This is new to v2.3!</b>
* In earlier versions, it just returned false, but * In earlier versions, it just returned false, but
@ -1531,7 +1531,7 @@ public class Base64 {
/** /**
* Convenience method for reading a base64-encoded * Convenience method for reading a base64-encoded
* file and decoding it. * file and decoding it.
* <p/> *
* <p>As of v 2.3, if there is a error, * <p>As of v 2.3, if there is a error,
* the method will throw an java.io.IOException. <b>This is new to v2.3!</b> * the method will throw an java.io.IOException. <b>This is new to v2.3!</b>
* In earlier versions, it just returned false, but * In earlier versions, it just returned false, but
@ -1592,7 +1592,7 @@ public class Base64 {
/** /**
* Convenience method for reading a binary file * Convenience method for reading a binary file
* and base64-encoding it. * and base64-encoding it.
* <p/> *
* <p>As of v 2.3, if there is a error, * <p>As of v 2.3, if there is a error,
* the method will throw an java.io.IOException. <b>This is new to v2.3!</b> * the method will throw an java.io.IOException. <b>This is new to v2.3!</b>
* In earlier versions, it just returned false, but * In earlier versions, it just returned false, but
@ -1740,13 +1740,13 @@ public class Base64 {
/** /**
* Constructs a {@link Base64.InputStream} in * Constructs a {@link Base64.InputStream} in
* either ENCODE or DECODE mode. * either ENCODE or DECODE mode.
* <p> *
* Valid options:<pre> * Valid options:<pre>
* ENCODE or DECODE: Encode or Decode as data is read. * ENCODE or DECODE: Encode or Decode as data is read.
* DO_BREAK_LINES: break lines at 76 characters * DO_BREAK_LINES: break lines at 76 characters
* (only meaningful when encoding)</i> * (only meaningful when encoding)</i>
* </pre> * </pre>
* <p> *
* Example: <code>new Base64.InputStream( in, Base64.DECODE )</code> * Example: <code>new Base64.InputStream( in, Base64.DECODE )</code>
* *
* @param in the <tt>java.io.InputStream</tt> from which to read data. * @param in the <tt>java.io.InputStream</tt> from which to read data.
@ -1951,13 +1951,13 @@ public class Base64 {
/** /**
* Constructs a {@link Base64.OutputStream} in * Constructs a {@link Base64.OutputStream} in
* either ENCODE or DECODE mode. * either ENCODE or DECODE mode.
* <p> *
* Valid options:<pre> * Valid options:<pre>
* ENCODE or DECODE: Encode or Decode as data is read. * ENCODE or DECODE: Encode or Decode as data is read.
* DO_BREAK_LINES: don't break lines at 76 characters * DO_BREAK_LINES: don't break lines at 76 characters
* (only meaningful when encoding)</i> * (only meaningful when encoding)</i>
* </pre> * </pre>
* <p> *
* Example: <code>new Base64.OutputStream( out, Base64.ENCODE )</code> * Example: <code>new Base64.OutputStream( out, Base64.ENCODE )</code>
* *
* @param out the <tt>java.io.OutputStream</tt> to which data will be written. * @param out the <tt>java.io.OutputStream</tt> to which data will be written.

View file

@ -1,16 +1,16 @@
/** /**
* Copyright (C) 2015 AsamK * Copyright (C) 2015 AsamK
* <p> *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or * the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version. * (at your option) any later version.
* <p> *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* <p> *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */

View file

@ -1,16 +1,16 @@
/** /**
* Copyright (C) 2015 AsamK * Copyright (C) 2015 AsamK
* <p> *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or * the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version. * (at your option) any later version.
* <p> *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* <p> *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */