Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/filefilter/PrefixFileFilter.java URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/filefilter/PrefixFileFilter.java?rev=1471767&r1=1471766&r2=1471767&view=diff ============================================================================== --- commons/proper/io/trunk/src/main/java/org/apache/commons/io/filefilter/PrefixFileFilter.java (original) +++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/filefilter/PrefixFileFilter.java Wed Apr 24 23:24:19 2013 @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -25,7 +25,7 @@ import org.apache.commons.io.IOCase; /** * Filters filenames for a certain prefix. * <p> - * For example, to print all files and directories in the + * For example, to print all files and directories in the * current directory whose name starts with <code>Test</code>: * * <pre> @@ -42,7 +42,7 @@ import org.apache.commons.io.IOCase; * @see FileFilterUtils#prefixFileFilter(String, IOCase) */ public class PrefixFileFilter extends AbstractFileFilter implements Serializable { - + /** The filename prefixes to search for */ private final String[] prefixes; @@ -51,7 +51,7 @@ public class PrefixFileFilter extends Ab /** * Constructs a new Prefix file filter for a single prefix. - * + * * @param prefix the prefix to allow, must not be null * @throws IllegalArgumentException if the prefix is null */ @@ -60,9 +60,9 @@ public class PrefixFileFilter extends Ab } /** - * Constructs a new Prefix file filter for a single prefix + * Constructs a new Prefix file filter for a single prefix * specifying case-sensitivity. - * + * * @param prefix the prefix to allow, must not be null * @param caseSensitivity how to handle case sensitivity, null means case-sensitive * @throws IllegalArgumentException if the prefix is null @@ -81,7 +81,7 @@ public class PrefixFileFilter extends Ab * <p> * The array is not cloned, so could be changed after constructing the * instance. This would be inadvisable however. - * + * * @param prefixes the prefixes to allow, must not be null * @throws IllegalArgumentException if the prefix array is null */ @@ -92,7 +92,7 @@ public class PrefixFileFilter extends Ab /** * Constructs a new Prefix file filter for any of an array of prefixes * specifying case-sensitivity. - * + * * @param prefixes the prefixes to allow, must not be null * @param caseSensitivity how to handle case sensitivity, null means case-sensitive * @throws IllegalArgumentException if the prefix is null @@ -109,7 +109,7 @@ public class PrefixFileFilter extends Ab /** * Constructs a new Prefix file filter for a list of prefixes. - * + * * @param prefixes the prefixes to allow, must not be null * @throws IllegalArgumentException if the prefix list is null * @throws ClassCastException if the list does not contain Strings @@ -121,7 +121,7 @@ public class PrefixFileFilter extends Ab /** * Constructs a new Prefix file filter for a list of prefixes * specifying case-sensitivity. - * + * * @param prefixes the prefixes to allow, must not be null * @param caseSensitivity how to handle case sensitivity, null means case-sensitive * @throws IllegalArgumentException if the prefix list is null @@ -138,7 +138,7 @@ public class PrefixFileFilter extends Ab /** * Checks to see if the filename starts with the prefix. - * + * * @param file the File to check * @return true if the filename starts with one of our prefixes */ @@ -152,10 +152,10 @@ public class PrefixFileFilter extends Ab } return false; } - + /** * Checks to see if the filename starts with the prefix. - * + * * @param file the File directory * @param name the filename * @return true if the filename starts with one of our prefixes @@ -191,5 +191,5 @@ public class PrefixFileFilter extends Ab buffer.append(")"); return buffer.toString(); } - + }
Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/filefilter/SuffixFileFilter.java URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/filefilter/SuffixFileFilter.java?rev=1471767&r1=1471766&r2=1471767&view=diff ============================================================================== --- commons/proper/io/trunk/src/main/java/org/apache/commons/io/filefilter/SuffixFileFilter.java (original) +++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/filefilter/SuffixFileFilter.java Wed Apr 24 23:24:19 2013 @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -26,7 +26,7 @@ import org.apache.commons.io.IOCase; * Filters files based on the suffix (what the filename ends with). * This is used in retrieving all the files of a particular type. * <p> - * For example, to retrieve and print all <code>*.java</code> files + * For example, to retrieve and print all <code>*.java</code> files * in the current directory: * * <pre> @@ -43,7 +43,7 @@ import org.apache.commons.io.IOCase; * @see FileFilterUtils#suffixFileFilter(String, IOCase) */ public class SuffixFileFilter extends AbstractFileFilter implements Serializable { - + /** The filename suffixes to search for */ private final String[] suffixes; @@ -52,7 +52,7 @@ public class SuffixFileFilter extends Ab /** * Constructs a new Suffix file filter for a single extension. - * + * * @param suffix the suffix to allow, must not be null * @throws IllegalArgumentException if the suffix is null */ @@ -82,7 +82,7 @@ public class SuffixFileFilter extends Ab * <p> * The array is not cloned, so could be changed after constructing the * instance. This would be inadvisable however. - * + * * @param suffixes the suffixes to allow, must not be null * @throws IllegalArgumentException if the suffix array is null */ @@ -93,7 +93,7 @@ public class SuffixFileFilter extends Ab /** * Constructs a new Suffix file filter for an array of suffixs * specifying case-sensitivity. - * + * * @param suffixes the suffixes to allow, must not be null * @param caseSensitivity how to handle case sensitivity, null means case-sensitive * @throws IllegalArgumentException if the suffix array is null @@ -110,7 +110,7 @@ public class SuffixFileFilter extends Ab /** * Constructs a new Suffix file filter for a list of suffixes. - * + * * @param suffixes the suffixes to allow, must not be null * @throws IllegalArgumentException if the suffix list is null * @throws ClassCastException if the list does not contain Strings @@ -122,7 +122,7 @@ public class SuffixFileFilter extends Ab /** * Constructs a new Suffix file filter for a list of suffixes * specifying case-sensitivity. - * + * * @param suffixes the suffixes to allow, must not be null * @param caseSensitivity how to handle case sensitivity, null means case-sensitive * @throws IllegalArgumentException if the suffix list is null @@ -139,7 +139,7 @@ public class SuffixFileFilter extends Ab /** * Checks to see if the filename ends with the suffix. - * + * * @param file the File to check * @return true if the filename ends with one of our suffixes */ @@ -153,10 +153,10 @@ public class SuffixFileFilter extends Ab } return false; } - + /** * Checks to see if the filename ends with the suffix. - * + * * @param file the File directory * @param name the filename * @return true if the filename ends with one of our suffixes @@ -192,5 +192,5 @@ public class SuffixFileFilter extends Ab buffer.append(")"); return buffer.toString(); } - + } Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/filefilter/WildcardFilter.java URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/filefilter/WildcardFilter.java?rev=1471767&r1=1471766&r2=1471767&view=diff ============================================================================== --- commons/proper/io/trunk/src/main/java/org/apache/commons/io/filefilter/WildcardFilter.java (original) +++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/filefilter/WildcardFilter.java Wed Apr 24 23:24:19 2013 @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -115,7 +115,7 @@ public class WildcardFilter extends Abst return true; } } - + return false; } @@ -136,7 +136,7 @@ public class WildcardFilter extends Abst return true; } } - + return false; } Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/CharSequenceInputStream.java URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/CharSequenceInputStream.java?rev=1471767&r1=1471766&r2=1471767&view=diff ============================================================================== --- commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/CharSequenceInputStream.java (original) +++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/CharSequenceInputStream.java Wed Apr 24 23:24:19 2013 @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -39,7 +39,7 @@ import java.nio.charset.CodingErrorActio public class CharSequenceInputStream extends InputStream { private static final int BUFFER_SIZE = 2048; - + private static final int EOS = -1; private static final int NO_MARK = -1; @@ -50,10 +50,10 @@ public class CharSequenceInputStream ext private int mark_cbuf; // position in cbuf private int mark_bbuf; // position in bbuf - + /** * Constructor. - * + * * @param cs the input character sequence * @param charset the character set name to use * @param bufferSize the buffer size to use. @@ -78,7 +78,7 @@ public class CharSequenceInputStream ext /** * Constructor, calls {@link #CharSequenceInputStream(CharSequence, Charset, int)}. - * + * * @param cs the input character sequence * @param charset the character set name to use * @param bufferSize the buffer size to use. @@ -91,7 +91,7 @@ public class CharSequenceInputStream ext /** * Constructor, calls {@link #CharSequenceInputStream(CharSequence, Charset, int)} * with a buffer size of 2048. - * + * * @param cs the input character sequence * @param charset the character set name to use * @throws IllegalArgumentException if the buffer is not large enough to hold a complete character @@ -103,7 +103,7 @@ public class CharSequenceInputStream ext /** * Constructor, calls {@link #CharSequenceInputStream(CharSequence, String, int)} * with a buffer size of 2048. - * + * * @param cs the input character sequence * @param charset the character set name to use * @throws IllegalArgumentException if the buffer is not large enough to hold a complete character @@ -114,7 +114,7 @@ public class CharSequenceInputStream ext /** * Fills the byte output buffer from the input char buffer. - * + * * @throws CharacterCodingException * an error encoding data */ @@ -126,7 +126,7 @@ public class CharSequenceInputStream ext } this.bbuf.flip(); } - + @Override public int read(final byte[] b, int off, int len) throws IOException { if (b == null) { @@ -254,7 +254,7 @@ public class CharSequenceInputStream ext if (this.cbuf.position() != this.mark_cbuf) { throw new IllegalStateException("Unexpected CharBuffer postion: actual="+cbuf.position() + " expected=" + this.mark_cbuf); } - this.bbuf.position(this.mark_bbuf); + this.bbuf.position(this.mark_bbuf); this.mark_cbuf = NO_MARK; this.mark_bbuf = NO_MARK; } @@ -264,5 +264,5 @@ public class CharSequenceInputStream ext public boolean markSupported() { return true; } - + } Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/ClassLoaderObjectInputStream.java URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/ClassLoaderObjectInputStream.java?rev=1471767&r1=1471766&r2=1471767&view=diff ============================================================================== --- commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/ClassLoaderObjectInputStream.java (original) +++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/ClassLoaderObjectInputStream.java Wed Apr 24 23:24:19 2013 @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -64,12 +64,12 @@ public class ClassLoaderObjectInputStrea @Override protected Class<?> resolveClass(final ObjectStreamClass objectStreamClass) throws IOException, ClassNotFoundException { - + try { return Class.forName(objectStreamClass.getName(), false, classLoader); } catch (ClassNotFoundException cnfe) { // delegate to super class loader which can resolve primitives - return super.resolveClass(objectStreamClass); + return super.resolveClass(objectStreamClass); } } @@ -97,5 +97,5 @@ public class ClassLoaderObjectInputStrea return super.resolveProxyClass(interfaces); } } - + } Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/ClosedInputStream.java URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/ClosedInputStream.java?rev=1471767&r1=1471766&r2=1471767&view=diff ============================================================================== --- commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/ClosedInputStream.java (original) +++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/ClosedInputStream.java Wed Apr 24 23:24:19 2013 @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -30,7 +30,7 @@ import java.io.InputStream; * @since 1.4 */ public class ClosedInputStream extends InputStream { - + /** * A singleton. */ Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/ReaderInputStream.java URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/ReaderInputStream.java?rev=1471767&r1=1471766&r2=1471767&view=diff ============================================================================== --- commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/ReaderInputStream.java (original) +++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/ReaderInputStream.java Wed Apr 24 23:24:19 2013 @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -69,9 +69,9 @@ import java.nio.charset.CodingErrorActio * will always return 0. Also, this class doesn't support {@link InputStream#mark(int)}. * <p> * Instances of {@link ReaderInputStream} are not thread safe. - * + * * @see org.apache.commons.io.output.WriterOutputStream - * + * * @since 2.0 */ public class ReaderInputStream extends InputStream { @@ -98,7 +98,7 @@ public class ReaderInputStream extends I /** * Construct a new {@link ReaderInputStream}. - * + * * @param reader the target {@link Reader} * @param encoder the charset encoder * @since 2.1 @@ -109,7 +109,7 @@ public class ReaderInputStream extends I /** * Construct a new {@link ReaderInputStream}. - * + * * @param reader the target {@link Reader} * @param encoder the charset encoder * @param bufferSize the size of the input buffer in number of characters @@ -126,7 +126,7 @@ public class ReaderInputStream extends I /** * Construct a new {@link ReaderInputStream}. - * + * * @param reader the target {@link Reader} * @param charset the charset encoding * @param bufferSize the size of the input buffer in number of characters @@ -142,7 +142,7 @@ public class ReaderInputStream extends I /** * Construct a new {@link ReaderInputStream} with a default input buffer size of * 1024 characters. - * + * * @param reader the target {@link Reader} * @param charset the charset encoding */ @@ -152,7 +152,7 @@ public class ReaderInputStream extends I /** * Construct a new {@link ReaderInputStream}. - * + * * @param reader the target {@link Reader} * @param charsetName the name of the charset encoding * @param bufferSize the size of the input buffer in number of characters @@ -164,7 +164,7 @@ public class ReaderInputStream extends I /** * Construct a new {@link ReaderInputStream} with a default input buffer size of * 1024 characters. - * + * * @param reader the target {@link Reader} * @param charsetName the name of the charset encoding */ @@ -175,7 +175,7 @@ public class ReaderInputStream extends I /** * Construct a new {@link ReaderInputStream} that uses the default character encoding * with a default input buffer size of 1024 characters. - * + * * @param reader the target {@link Reader} * @deprecated 2.5 use {@link #ReaderInputStream(Reader, Charset)} instead */ @@ -186,7 +186,7 @@ public class ReaderInputStream extends I /** * Fills the internal char buffer from the reader. - * + * * @throws IOException * If an I/O error occurs */ @@ -209,10 +209,10 @@ public class ReaderInputStream extends I lastCoderResult = encoder.encode(encoderIn, encoderOut, endOfInput); encoderOut.flip(); } - + /** * Read the specified number of bytes into an array. - * + * * @param b the byte array to read into * @param off the offset to start reading bytes into * @param len the number of bytes to read @@ -252,7 +252,7 @@ public class ReaderInputStream extends I /** * Read the specified number of bytes into an array. - * + * * @param b the byte array to read into * @return the number of bytes read or <code>-1</code> * if the end of the stream has been reached Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/Tailer.java URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/Tailer.java?rev=1471767&r1=1471766&r2=1471767&view=diff ============================================================================== --- commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/Tailer.java (original) +++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/Tailer.java Wed Apr 24 23:24:19 2013 @@ -43,7 +43,7 @@ import org.apache.commons.io.IOUtils; * System.out.println(line); * } * }</pre> - * + * * <h2>2. Using a Tailer</h2> * * You can create and use a Tailer in one of three ways: @@ -60,15 +60,15 @@ import org.apache.commons.io.IOUtils; * </ul> * * An example of each of these is shown below. - * + * * <h3>2.1 Using the static helper method</h3> * * <pre> * TailerListener listener = new MyTailerListener(); * Tailer tailer = Tailer.create(file, listener, delay);</pre> - * + * * <h3>2.2 Using an Executor</h3> - * + * * <pre> * TailerListener listener = new MyTailerListener(); * Tailer tailer = new Tailer(file, listener, delay); @@ -82,8 +82,8 @@ import org.apache.commons.io.IOUtils; * * executor.execute(tailer); * </pre> - * - * + * + * * <h3>2.3 Using a Thread</h3> * <pre> * TailerListener listener = new MyTailerListener(); @@ -104,7 +104,7 @@ import org.apache.commons.io.IOUtils; * thread.interrupt(); * </pre> * <p>If you interrupt a tailer, the tailer listener is called with the {@link InterruptedException}.</p> - * + * * @see TailerListener * @see TailerListenerAdapter * @version $Id$ @@ -118,12 +118,12 @@ public class Tailer implements Runnable private static final String RAF_MODE = "r"; private static final int DEFAULT_BUFSIZE = 4096; - + /** * Buffer on top of RandomAccessFile. */ private final byte inbuf[]; - + /** * The file which will be tailed. */ @@ -148,7 +148,7 @@ public class Tailer implements Runnable * Whether to close and reopen the file whilst waiting for more input. */ private final boolean reOpen; - + /** * The tailer will run as long as this value is true. */ @@ -183,19 +183,19 @@ public class Tailer implements Runnable public Tailer(final File file, final TailerListener listener, final long delayMillis, final boolean end) { this(file, listener, delayMillis, end, DEFAULT_BUFSIZE); } - + /** * Creates a Tailer for the given file, with a delay other than the default 1.0s. * @param file the file to follow. * @param listener the TailerListener to use. * @param delayMillis the delay between checks of the file for new content in milliseconds. * @param end Set to true to tail from the end of the file, false to tail from the beginning of the file. - * @param reOpen if true, close and reopen the file between reading chunks + * @param reOpen if true, close and reopen the file between reading chunks */ public Tailer(final File file, final TailerListener listener, final long delayMillis, final boolean end, final boolean reOpen) { this(file, listener, delayMillis, end, reOpen, DEFAULT_BUFSIZE); } - + /** * Creates a Tailer for the given file, with a specified buffer size. * @param file the file to follow. @@ -207,21 +207,21 @@ public class Tailer implements Runnable public Tailer(final File file, final TailerListener listener, final long delayMillis, final boolean end, final int bufSize) { this(file, listener, delayMillis, end, false, bufSize); } - + /** * Creates a Tailer for the given file, with a specified buffer size. * @param file the file to follow. * @param listener the TailerListener to use. * @param delayMillis the delay between checks of the file for new content in milliseconds. * @param end Set to true to tail from the end of the file, false to tail from the beginning of the file. - * @param reOpen if true, close and reopen the file between reading chunks + * @param reOpen if true, close and reopen the file between reading chunks * @param bufSize Buffer size */ public Tailer(final File file, final TailerListener listener, final long delayMillis, final boolean end, final boolean reOpen, final int bufSize) { this.file = file; this.delayMillis = delayMillis; this.end = end; - + this.inbuf = new byte[bufSize]; // Save and prepare the listener @@ -229,10 +229,10 @@ public class Tailer implements Runnable listener.init(this); this.reOpen = reOpen; } - + /** * Creates and starts a Tailer for the given file. - * + * * @param file the file to follow. * @param listener the TailerListener to use. * @param delayMillis the delay between checks of the file for new content in milliseconds. @@ -246,7 +246,7 @@ public class Tailer implements Runnable /** * Creates and starts a Tailer for the given file. - * + * * @param file the file to follow. * @param listener the TailerListener to use. * @param delayMillis the delay between checks of the file for new content in milliseconds. @@ -255,7 +255,7 @@ public class Tailer implements Runnable * @param bufSize buffer size. * @return The new tailer */ - public static Tailer create(final File file, final TailerListener listener, final long delayMillis, final boolean end, final boolean reOpen, + public static Tailer create(final File file, final TailerListener listener, final long delayMillis, final boolean end, final boolean reOpen, final int bufSize) { final Tailer tailer = new Tailer(file, listener, delayMillis, end, reOpen, bufSize); final Thread thread = new Thread(tailer); @@ -266,7 +266,7 @@ public class Tailer implements Runnable /** * Creates and starts a Tailer for the given file with default buffer size. - * + * * @param file the file to follow. * @param listener the TailerListener to use. * @param delayMillis the delay between checks of the file for new content in milliseconds. @@ -279,7 +279,7 @@ public class Tailer implements Runnable /** * Creates and starts a Tailer for the given file with default buffer size. - * + * * @param file the file to follow. * @param listener the TailerListener to use. * @param delayMillis the delay between checks of the file for new content in milliseconds. @@ -293,7 +293,7 @@ public class Tailer implements Runnable /** * Creates and starts a Tailer for the given file, starting at the beginning of the file - * + * * @param file the file to follow. * @param listener the TailerListener to use. * @param delayMillis the delay between checks of the file for new content in milliseconds. @@ -306,7 +306,7 @@ public class Tailer implements Runnable /** * Creates and starts a Tailer for the given file, starting at the beginning of the file * with the default delay of 1.0s - * + * * @param file the file to follow. * @param listener the TailerListener to use. * @return The new tailer @@ -326,7 +326,7 @@ public class Tailer implements Runnable /** * Gets whether to keep on running. - * + * * @return whether to keep on running. * @since 2.5 */ @@ -423,10 +423,10 @@ public class Tailer implements Runnable reader.seek(position); } } - } catch (final InterruptedException e) { + } catch (final InterruptedException e) { Thread.currentThread().interrupt(); stop(e); - } catch (final Exception e) { + } catch (final Exception e) { stop(e); } finally { IOUtils.closeQuietly(reader); @@ -480,7 +480,7 @@ public class Tailer implements Runnable if (seenCR) { seenCR = false; // swallow final CR listener.handle(new String(lineBuf.toByteArray(), cset)); - lineBuf.reset(); + lineBuf.reset(); rePos = pos + i + 1; } lineBuf.write(ch); Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/XmlStreamReader.java URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/XmlStreamReader.java?rev=1471767&r1=1471766&r2=1471767&view=diff ============================================================================== --- commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/XmlStreamReader.java (original) +++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/XmlStreamReader.java Wed Apr 24 23:24:19 2013 @@ -91,15 +91,15 @@ public class XmlStreamReader extends Rea ByteOrderMark.UTF_32BE, ByteOrderMark.UTF_32LE }; - + // UTF_16LE and UTF_32LE have the same two starting BOM bytes. private static final ByteOrderMark[] XML_GUESS_BYTES = new ByteOrderMark[] { new ByteOrderMark(UTF_8, 0x3C, 0x3F, 0x78, 0x6D), new ByteOrderMark(UTF_16BE, 0x00, 0x3C, 0x00, 0x3F), new ByteOrderMark(UTF_16LE, 0x3C, 0x00, 0x3F, 0x00), - new ByteOrderMark(UTF_32BE, 0x00, 0x00, 0x00, 0x3C, + new ByteOrderMark(UTF_32BE, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x6D), - new ByteOrderMark(UTF_32LE, 0x3C, 0x00, 0x00, 0x00, + new ByteOrderMark(UTF_32LE, 0x3C, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x6D, 0x00, 0x00, 0x00), new ByteOrderMark(EBCDIC, 0x4C, 0x6F, 0xA7, 0x94) }; @@ -751,14 +751,14 @@ public class XmlStreamReader extends Rea /** * Indicates if the MIME type belongs to the APPLICATION XML family. - * + * * @param mime The mime type * @return true if the mime type belongs to the APPLICATION XML family, * otherwise false */ static boolean isAppXml(final String mime) { return mime != null && - (mime.equals("application/xml") || + (mime.equals("application/xml") || mime.equals("application/xml-dtd") || mime.equals("application/xml-external-parsed-entity") || mime.startsWith("application/") && mime.endsWith("+xml")); @@ -766,7 +766,7 @@ public class XmlStreamReader extends Rea /** * Indicates if the MIME type belongs to the TEXT XML family. - * + * * @param mime The mime type * @return true if the mime type belongs to the TEXT XML family, * otherwise false Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/output/ByteArrayOutputStream.java URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/output/ByteArrayOutputStream.java?rev=1471767&r1=1471766&r2=1471767&view=diff ============================================================================== --- commons/proper/io/trunk/src/main/java/org/apache/commons/io/output/ByteArrayOutputStream.java (original) +++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/output/ByteArrayOutputStream.java Wed Apr 24 23:24:19 2013 @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -15,7 +15,7 @@ * limitations under the License. */ package org.apache.commons.io.output; - + import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; @@ -30,10 +30,10 @@ import java.util.List; import org.apache.commons.io.input.ClosedInputStream; /** - * This class implements an output stream in which the data is - * written into a byte array. The buffer automatically grows as data + * This class implements an output stream in which the data is + * written into a byte array. The buffer automatically grows as data * is written to it. - * <p> + * <p> * The data can be retrieved using <code>toByteArray()</code> and * <code>toString()</code>. * <p> @@ -49,7 +49,7 @@ import org.apache.commons.io.input.Close * the contents don't have to be copied to the new buffer. This class is * designed to behave exactly like the original. The only exception is the * deprecated toString(int) method that has been ignored. - * + * * @version $Id$ */ public class ByteArrayOutputStream extends OutputStream { @@ -71,16 +71,16 @@ public class ByteArrayOutputStream exten private boolean reuseBuffers = true; /** - * Creates a new byte array output stream. The buffer capacity is - * initially 1024 bytes, though its size increases if necessary. + * Creates a new byte array output stream. The buffer capacity is + * initially 1024 bytes, though its size increases if necessary. */ public ByteArrayOutputStream() { this(1024); } /** - * Creates a new byte array output stream, with a buffer capacity of - * the specified size, in bytes. + * Creates a new byte array output stream, with a buffer capacity of + * the specified size, in bytes. * * @param size the initial size * @throws IllegalArgumentException if size is negative @@ -105,7 +105,7 @@ public class ByteArrayOutputStream exten if (currentBufferIndex < buffers.size() - 1) { //Recycling old buffer filledBufferSum += currentBuffer.length; - + currentBufferIndex++; currentBuffer = buffers.get(currentBufferIndex); } else { @@ -116,11 +116,11 @@ public class ByteArrayOutputStream exten filledBufferSum = 0; } else { newBufferSize = Math.max( - currentBuffer.length << 1, + currentBuffer.length << 1, newcount - filledBufferSum); filledBufferSum += currentBuffer.length; } - + currentBufferIndex++; currentBuffer = new byte[newBufferSize]; buffers.add(currentBuffer); @@ -135,10 +135,10 @@ public class ByteArrayOutputStream exten */ @Override public void write(final byte[] b, final int off, final int len) { - if ((off < 0) - || (off > b.length) - || (len < 0) - || ((off + len) > b.length) + if ((off < 0) + || (off > b.length) + || (len < 0) + || ((off + len) > b.length) || ((off + len) < 0)) { throw new IndexOutOfBoundsException(); } else if (len == 0) { @@ -279,7 +279,7 @@ public class ByteArrayOutputStream exten * avoids unnecessary allocation and copy of byte[].<br> * This method buffers the input internally, so there is no need to use a * <code>BufferedInputStream</code>. - * + * * @param input Stream to be fully buffered. * @return A fully buffered stream. * @throws IOException if an I/O error occurs @@ -298,7 +298,7 @@ public class ByteArrayOutputStream exten * Gets the current contents of this byte stream as a Input Stream. The * returned stream is backed by buffers of <code>this</code> stream, * avoiding memory allocation and copy, thus saving space and time.<br> - * + * * @return the current contents of this output stream. * @see java.io.ByteArrayOutputStream#toByteArray() * @see #reset() @@ -332,7 +332,7 @@ public class ByteArrayOutputStream exten public synchronized byte[] toByteArray() { int remaining = count; if (remaining == 0) { - return EMPTY_BYTE_ARRAY; + return EMPTY_BYTE_ARRAY; } final byte newbuf[] = new byte[remaining]; int pos = 0; Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/output/ClosedOutputStream.java URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/output/ClosedOutputStream.java?rev=1471767&r1=1471766&r2=1471767&view=diff ============================================================================== --- commons/proper/io/trunk/src/main/java/org/apache/commons/io/output/ClosedOutputStream.java (original) +++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/output/ClosedOutputStream.java Wed Apr 24 23:24:19 2013 @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -31,7 +31,7 @@ import java.io.OutputStream; * @since 1.4 */ public class ClosedOutputStream extends OutputStream { - + /** * A singleton. */ Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/output/DeferredFileOutputStream.java URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/output/DeferredFileOutputStream.java?rev=1471767&r1=1471766&r2=1471767&view=diff ============================================================================== --- commons/proper/io/trunk/src/main/java/org/apache/commons/io/output/DeferredFileOutputStream.java (original) +++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/output/DeferredFileOutputStream.java Wed Apr 24 23:24:19 2013 @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -80,7 +80,7 @@ public class DeferredFileOutputStream */ private final File directory; - + /** * True when close() has been called successfully. */ @@ -124,7 +124,7 @@ public class DeferredFileOutputStream /** * Constructs an instance of this class which will trigger an event at the * specified threshold, and save data either to a file beyond that point. - * + * * @param threshold The number of bytes at which to trigger an event. * @param outputFile The file to which data is saved beyond the threshold. * @param prefix Prefix to use for the temporary file. @@ -234,8 +234,8 @@ public class DeferredFileOutputStream { return outputFile; } - - + + /** * Closes underlying output stream, and mark this as closed * @@ -247,8 +247,8 @@ public class DeferredFileOutputStream super.close(); closed = true; } - - + + /** * Writes the data from this output stream to the specified output stream, * after it has been closed. @@ -256,7 +256,7 @@ public class DeferredFileOutputStream * @param out output stream to write to. * @exception IOException if this stream is not yet closed or an error occurs. */ - public void writeTo(final OutputStream out) throws IOException + public void writeTo(final OutputStream out) throws IOException { // we may only need to check if this is closed if we are working with a file // but we should force the habit of closing wether we are working with @@ -265,7 +265,7 @@ public class DeferredFileOutputStream { throw new IOException("Stream not closed"); } - + if(isInMemory()) { memoryOutputStream.writeTo(out); Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/output/LockableFileWriter.java URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/output/LockableFileWriter.java?rev=1471767&r1=1471766&r2=1471767&view=diff ============================================================================== --- commons/proper/io/trunk/src/main/java/org/apache/commons/io/output/LockableFileWriter.java (original) +++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/output/LockableFileWriter.java Wed Apr 24 23:24:19 2013 @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -39,7 +39,7 @@ import org.apache.commons.io.IOUtils; * <p> * <b>N.B.</b> the lock file is deleted when {@link #close()} is called * - or if the main file cannot be opened initially. - * In the (unlikely) event that the lockfile cannot be deleted, + * In the (unlikely) event that the lockfile cannot be deleted, * this is not reported, and subsequent requests using * the same lockfile will fail. * <p> @@ -188,7 +188,7 @@ public class LockableFileWriter extends if (file.isDirectory()) { throw new IOException("File specified is a directory"); } - + // init lock file if (lockDir == null) { lockDir = System.getProperty("java.io.tmpdir"); @@ -197,10 +197,10 @@ public class LockableFileWriter extends FileUtils.forceMkdir(lockDirFile); testLockDir(lockDirFile); lockFile = new File(lockDirFile, file.getName() + LCK); - + // check if locked createLock(); - + // init wrapped writer out = initWriter(file, encoding, append); } Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/output/NullOutputStream.java URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/output/NullOutputStream.java?rev=1471767&r1=1471766&r2=1471767&view=diff ============================================================================== --- commons/proper/io/trunk/src/main/java/org/apache/commons/io/output/NullOutputStream.java (original) +++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/output/NullOutputStream.java Wed Apr 24 23:24:19 2013 @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -15,7 +15,7 @@ * limitations under the License. */ package org.apache.commons.io.output; - + import java.io.IOException; import java.io.OutputStream; @@ -24,11 +24,11 @@ import java.io.OutputStream; * <p> * This output stream has no destination (file/socket etc.) and all * bytes written to it are ignored and lost. - * + * * @version $Id$ */ public class NullOutputStream extends OutputStream { - + /** * A singleton. */ Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/output/NullWriter.java URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/output/NullWriter.java?rev=1471767&r1=1471766&r2=1471767&view=diff ============================================================================== --- commons/proper/io/trunk/src/main/java/org/apache/commons/io/output/NullWriter.java (original) +++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/output/NullWriter.java Wed Apr 24 23:24:19 2013 @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -23,11 +23,11 @@ import java.io.Writer; * <p> * This <code>Writer</code> has no destination (file/socket etc.) and all * characters written to it are ignored and lost. - * + * * @version $Id$ */ public class NullWriter extends Writer { - + /** * A singleton. */
