diff --git a/src/main/org/apache/tools/ant/filters/StringInputStream.java b/src/main/org/apache/tools/ant/filters/StringInputStream.java index 96d84b5c4..1cc4519a3 100644 --- a/src/main/org/apache/tools/ant/filters/StringInputStream.java +++ b/src/main/org/apache/tools/ant/filters/StringInputStream.java @@ -1,7 +1,7 @@ /* * The Apache Software License, Version 1.1 * - * Copyright (c) 2002 The Apache Software Foundation. All rights + * Copyright (c) 2002-2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without @@ -125,6 +125,16 @@ public class StringInputStream } } + /** + * Reads from the Stringreader into a byte array + * + * @param b the byte array to read into + * @param off the offset in the byte array + * @param len the length in the byte array to fill + * @return the actual number read into the byte array, -1 at + * the end of the stream + * @exception IOException if an error occurs + */ public synchronized int read(byte[] b, int off, int len) throws IOException { @@ -176,6 +186,10 @@ public class StringInputStream } + /** + * @return the current number of bytes ready for reading + * @exception IOException if an error occurs + */ public synchronized int available() throws IOException { if (in == null) { throw new IOException("Stream Closed"); @@ -190,6 +204,9 @@ public class StringInputStream } } + /** + * @return false - mark is not supported + */ public boolean markSupported () { return false; // would be imprecise } diff --git a/src/main/org/apache/tools/ant/filters/util/ChainReaderHelper.java b/src/main/org/apache/tools/ant/filters/util/ChainReaderHelper.java index 655200646..56917587c 100644 --- a/src/main/org/apache/tools/ant/filters/util/ChainReaderHelper.java +++ b/src/main/org/apache/tools/ant/filters/util/ChainReaderHelper.java @@ -98,6 +98,7 @@ public final class ChainReaderHelper { /** * Sets the primary reader + * @param rdr the reader object */ public final void setPrimaryReader(Reader rdr) { primaryReader = rdr; @@ -105,6 +106,7 @@ public final class ChainReaderHelper { /** * Set the project to work with + * @param project the current project */ public final void setProject(final Project project) { this.project = project; @@ -112,6 +114,8 @@ public final class ChainReaderHelper { /** * Get the project + * + * @return the current project */ public final Project getProject() { return project; @@ -120,6 +124,7 @@ public final class ChainReaderHelper { /** * Sets the buffer size to be used. Defaults to 4096, * if this method is not invoked. + * @param size the buffer size to use */ public final void setBufferSize(int size) { bufferSize = size; @@ -127,6 +132,8 @@ public final class ChainReaderHelper { /** * Sets the collection of filter reader sets + * + * @param fchain the filter chains collection */ public final void setFilterChains(Vector fchain) { filterChains = fchain; @@ -134,6 +141,8 @@ public final class ChainReaderHelper { /** * Assemble the reader + * @return the assembled reader + * @exception BuildException if an error occurs */ public final Reader getAssembledReader() throws BuildException { if (primaryReader == null) { @@ -249,6 +258,9 @@ public final class ChainReaderHelper { /** * Read data from the reader and return the * contents as a string. + * @param rdr the reader object + * @return the contents of the file as a string + * @exception IOException if an error occurs */ public final String readFully(Reader rdr) throws IOException { diff --git a/src/main/org/apache/tools/ant/filters/util/JavaClassHelper.java b/src/main/org/apache/tools/ant/filters/util/JavaClassHelper.java index bd0f928c3..e94cd3a39 100644 --- a/src/main/org/apache/tools/ant/filters/util/JavaClassHelper.java +++ b/src/main/org/apache/tools/ant/filters/util/JavaClassHelper.java @@ -1,7 +1,7 @@ /* * The Apache Software License, Version 1.1 * - * Copyright (c) 2002 The Apache Software Foundation. All rights + * Copyright (c) 2002-2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without @@ -72,6 +72,10 @@ public final class JavaClassHelper { /** * Get the constants declared in a file as name=value + * + * @param bytes the class as a array of bytes + * @return a StringBuffer contains the name=value pairs + * @exception IOException if an error occurs */ public static final StringBuffer getConstants(byte[] bytes) throws IOException {