You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2021/11/04 07:52:08 UTC
[groovy] branch master updated: fix comments
This is an automated email from the ASF dual-hosted git repository.
paulk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/master by this push:
new 1a11eb7 fix comments
1a11eb7 is described below
commit 1a11eb75ebe320a04a784baa4fbc138d3707bde0
Author: Paul King <pa...@asert.com.au>
AuthorDate: Thu Nov 4 17:52:01 2021 +1000
fix comments
---
.../org/codehaus/groovy/runtime/IOGroovyMethods.java | 16 ++++++++--------
.../codehaus/groovy/runtime/ResourceGroovyMethods.java | 8 ++++----
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/main/java/org/codehaus/groovy/runtime/IOGroovyMethods.java b/src/main/java/org/codehaus/groovy/runtime/IOGroovyMethods.java
index c782f57..76e9d41 100644
--- a/src/main/java/org/codehaus/groovy/runtime/IOGroovyMethods.java
+++ b/src/main/java/org/codehaus/groovy/runtime/IOGroovyMethods.java
@@ -60,11 +60,11 @@ import static org.codehaus.groovy.ast.tools.ClosureUtils.hasSingleStringArg;
import static org.codehaus.groovy.runtime.DefaultGroovyMethods.callClosureForLine;
/**
- * This class defines new groovy methods for Files, URLs, URIs which appear
- * on normal JDK classes inside the Groovy environment.
+ * This class defines new groovy methods for Readers, Writers, InputStreams and
+ * OutputStreams which appear on normal JDK classes inside the Groovy environment.
* Static methods are used with the first parameter being the destination class,
- * i.e. <code>public static long size(File self)</code>
- * provides a <code>size()</code> method for <code>File</code>.
+ * i.e. <code>public static T eachLine(InputStream self, Closure c)</code>
+ * provides a <code>eachLine(Closure c)</code> method for <code>InputStream</code>.
* <p>
* NOTE: While this class contains many 'public' static methods, it is
* primarily regarded as an internal class (its internal package name
@@ -316,7 +316,7 @@ public class IOGroovyMethods extends DefaultGroovyMethodsSupport {
}
/**
- * Create a new ObjectInputStream for this file and pass it to the closure.
+ * Create a new ObjectInputStream for this input stream and pass it to the closure.
* This method ensures the stream is closed after the closure returns.
*
* @param inputStream an input stream
@@ -331,7 +331,7 @@ public class IOGroovyMethods extends DefaultGroovyMethodsSupport {
}
/**
- * Create a new ObjectInputStream for this file and pass it to the closure.
+ * Create a new ObjectInputStream for this input stream and pass it to the closure.
* This method ensures the stream is closed after the closure returns.
*
* @param inputStream an input stream
@@ -854,7 +854,7 @@ public class IOGroovyMethods extends DefaultGroovyMethodsSupport {
*/
public static String getText(BufferedReader reader) throws IOException {
StringBuilder answer = new StringBuilder();
- // reading the content of the file within a char buffer
+ // reading the content of the reader within a char buffer
// allow to keep the correct line endings
char[] charBuffer = new char[8192];
int nbCharRead /* = 0*/;
@@ -883,7 +883,7 @@ public class IOGroovyMethods extends DefaultGroovyMethodsSupport {
*/
public static byte[] getBytes(InputStream is) throws IOException {
ByteArrayOutputStream answer = new ByteArrayOutputStream();
- // reading the content of the file within a byte buffer
+ // reading the content of the stream within a byte buffer
byte[] byteBuffer = new byte[8192];
int nbByteRead /* = 0*/;
try {
diff --git a/src/main/java/org/codehaus/groovy/runtime/ResourceGroovyMethods.java b/src/main/java/org/codehaus/groovy/runtime/ResourceGroovyMethods.java
index da95a7d..a7b3997 100644
--- a/src/main/java/org/codehaus/groovy/runtime/ResourceGroovyMethods.java
+++ b/src/main/java/org/codehaus/groovy/runtime/ResourceGroovyMethods.java
@@ -72,11 +72,11 @@ import java.util.Map;
import java.util.regex.Pattern;
/**
- * This class defines new groovy methods for Readers, Writers, InputStreams and
- * OutputStreams which appear on normal JDK classes inside the Groovy environment.
+ * This class defines new groovy methods for Files, URLs, URIs which appear
+ * on normal JDK classes inside the Groovy environment.
* Static methods are used with the first parameter being the destination class,
- * i.e. <code>public static T eachLine(InputStream self, Closure c)</code>
- * provides a <code>eachLine(Closure c)</code> method for <code>InputStream</code>.
+ * i.e. <code>public static long size(File self)</code>
+ * provides a <code>size()</code> method for <code>File</code>.
* <p>
* NOTE: While this class contains many 'public' static methods, it is
* primarily regarded as an internal class (its internal package name