Index: src/test/java/tests/api/java/nio/charset/CharsetProviderTest.java =================================================================== --- src/test/java/tests/api/java/nio/charset/CharsetProviderTest.java (revision 483460) +++ src/test/java/tests/api/java/nio/charset/CharsetProviderTest.java (working copy) @@ -194,7 +194,7 @@ } /* - * Test the method isSupported(String) with insufficient prililege to use + * Test the method isSupported(String) with insufficient privilege to use * charset provider. */ public void testIsSupported_InsufficientPrililege() throws Exception { Index: src/test/java/tests/api/java/nio/charset/ISOCharsetDecoderTest.java =================================================================== --- src/test/java/tests/api/java/nio/charset/ISOCharsetDecoderTest.java (revision 483460) +++ src/test/java/tests/api/java/nio/charset/ISOCharsetDecoderTest.java (working copy) @@ -44,7 +44,7 @@ // } ByteBuffer getUnmappedByteBuffer() throws UnsupportedEncodingException { - // TODO how onmap? + // TODO how on map? return null; } Index: src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/CharsetEncoderTest.java =================================================================== --- src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/CharsetEncoderTest.java (revision 483460) +++ src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/CharsetEncoderTest.java (working copy) @@ -64,7 +64,7 @@ } /** - * Helper for contructor tests + * Helper for constructor tests */ public static class MockCharsetEncoderForHarmony141 extends CharsetEncoder { Index: src/main/java/java/nio/charset/CharsetDecoder.java =================================================================== --- src/main/java/java/nio/charset/CharsetDecoder.java (revision 483460) +++ src/main/java/java/nio/charset/CharsetDecoder.java (working copy) @@ -35,7 +35,7 @@ *
endOfInput
+ * method until the additional input is not needed, the endOfInput
* parameter must be set to false, the input buffer must be filled and the
* output buffer must be flushed between invocations;- * This method decodes the remaning byte sequence of the given byte buffer + * This method decodes the remaining byte sequence of the given byte buffer * into a new character buffer. This method performs a complete decoding * operation, resets at first, then decodes, and flushes at last. *
@@ -232,7 +232,7 @@ * encountered, and the action for unmappable character error is * {@link CodingErrorAction#REPORT CodingErrorAction.REPORT}. * Unmappable means the byte sequence at the input buffer's - * current postion cannot be mapped to a Unicode character + * current position cannot be mapped to a Unicode character * sequence. * @throws CharacterCodingException * if other exception happened during the decode operation @@ -268,7 +268,7 @@ output.flip(); CharBuffer truncatedBuffer = null; // truncate elements after limit in the output. - // clippedBuffer has the same value of capcity and limit. + // clippedBuffer has the same value of capacity and limit. if (output.limit() == output.capacity()) { truncatedBuffer = output; } else { @@ -311,17 +311,17 @@ /** * Decodes bytes starting at the current position of the given input buffer, * and writes the equivalent character sequence into the given output buffer - * from its current postion. + * from its current position. ** The buffers' position will be changed with the reading and writing - * operation, but their limis and marks will be kept intact. + * operation, but their limits and marks will be kept intact. *
*
* A CoderResult instance will be returned according to
* following rules:
*
out argument that has not already been filled.CoderResult
* is same as the {@link #decode(ByteBuffer, CharBuffer, boolean) decode}.
* When exception encountered in the decoding operation, most implementation
- * of this mehtod will return a relevant result object to
+ * of this method will return a relevant result object to
* {@link #decode(ByteBuffer, CharBuffer, boolean) decode} method, and some
* performance optimized implementation may handle the exception and
* implement the error action itself.
*
- * The buffers are scanned from their current positions, and their postions
+ * The buffers are scanned from their current positions, and their positions
* will be modified accordingly, while their marks and limits will be
* intact. At most {@link ByteBuffer#remaining() in.remaining()} characters
* will be read, and {@link CharBuffer#remaining() out.remaining()} bytes
@@ -518,11 +518,11 @@
* charset will be the same for the rest of the decode operation.
*
*
- * If insuffient bytes have been read to determine the charset,
- * IllegalStateException will be throwed.
+ * If insufficient bytes have been read to determine the charset,
+ * IllegalStateException will be thrown.
*
- * The default implementation alwyas throws
+ * The default implementation always throws
* UnsupportedOperationException, so it should be overridden
* by subclass if needed.
*
CoderResult.OVERFLOW will be returned, and this method
* must be called again with a character buffer that has more spaces.
* Otherwise this method will return CoderResult.UNDERFLOW,
- * which means one decoding process has been completed sucessfully.
+ * which means one decoding process has been completed successfully.
*
* During the flush, the output buffer's position will be changed
* accordingly, while its mark and limit will be intact.
@@ -581,7 +581,7 @@
}
/**
- * Flush this decoder. Default implementaion does nothing and always return
+ * Flush this decoder. Default implementation does nothing and always return
* CoderResult.UNDERFLOW, and this method can be overridden
* if needed.
*
@@ -596,7 +596,7 @@
/**
* Notify that this decoder's CodingErrorAction specified for
- * malformed input error has been changed. Default implementaion does
+ * malformed input error has been changed. Default implementation does
* nothing, and this method can be overridden if needed.
*
* @param newAction
@@ -608,7 +608,7 @@
/**
* Notify that this decoder's CodingErrorAction specified for
- * unmappable character error has been changed. Default implementaion does
+ * unmappable character error has been changed. Default implementation does
* nothing, and this method can be overridden if needed.
*
* @param newAction
@@ -620,7 +620,7 @@
/**
* Notify that this decoder's replacement has been changed. Default
- * implementaion does nothing, and this method can be overridden if needed.
+ * implementation does nothing, and this method can be overridden if needed.
*
* @param newReplacement
* the new replacement string
@@ -630,7 +630,7 @@
}
/**
- * Reset this decoder's charset related state. Default implementaion does
+ * Reset this decoder's charset related state. Default implementation does
* nothing, and this method can be overridden if needed.
*/
protected void implReset() {
@@ -678,10 +678,10 @@
/**
* Gets this decoder's CodingErrorAction when malformed input
- * occured during decoding process.
+ * occurred during decoding process.
*
* @return this decoder's CodingErrorAction when malformed
- * input occured during decoding process.
+ * input occurred during decoding process.
*/
public CodingErrorAction malformedInputAction() {
return malformAction;
@@ -765,7 +765,7 @@
* @return this decoder
* @throws IllegalArgumentException
* if the given replacement cannot satisfy the requirement
- * metioned above
+ * mentioned above
*/
public final CharsetDecoder replaceWith(String newReplacement) {
if (null == newReplacement || newReplacement.length() == 0) {
@@ -799,10 +799,10 @@
/**
* Gets this decoder's CodingErrorAction when unmappable
- * character occured during decoding process.
+ * character occurred during decoding process.
*
* @return this decoder's CodingErrorAction when unmappable
- * character occured during decoding process.
+ * character occurred during decoding process.
*/
public CodingErrorAction unmappableCharacterAction() {
return unmapAction;
Index: src/main/java/java/nio/charset/Charset.java
===================================================================
--- src/main/java/java/nio/charset/Charset.java (revision 483460)
+++ src/main/java/java/nio/charset/Charset.java (working copy)
@@ -63,7 +63,7 @@
* encoded in "UTF-8". Each line of their content specifies the class name of a
* charset provider which extends java.nio.spi.CharsetProvider.
* A line should ends with '\r', '\n' or '\r\n'. Leading and trailing
- * whitespaces are trimed. Blank lines, and lines (after trimed) starting with
+ * whitespaces are trimmed. Blank lines, and lines (after trimmed) starting with
* "#" which are regarded as comments, are both ignored. Duplicates of already
* appeared names are also ignored. Both the configuration files and the
* provider classes will be loaded using the thread context class loader.
@@ -180,7 +180,7 @@
// check whether the given canonical name is legal
checkCharsetName(canonicalName);
this.canonicalName = canonicalName;
- // check each aliase and put into a set
+ // check each aliases and put into a set
this.aliasesSet = new HashSetIllegalStateException.
*
- * This method can be overriden for performance improvement.
+ * This method can be overridden for performance improvement.
*
* @param c
* the given encoder
* @return true if given character can be encoded by this encoder
* @throws IllegalStateException
* if another encode process is ongoing so that current internal
- * status is neigher RESET or FLUSH
+ * status is neither RESET or FLUSH
*/
public boolean canEncode(char c) {
return implCanEncode(CharBuffer.wrap(new char[] { c }));
@@ -279,14 +279,14 @@
* it should not be called when another encode process is ongoing, otherwise
* it will throw IllegalStateException.
*
- * This method can be overriden for performance improvement.
+ * This method can be overridden for performance improvement.
*
* @param sequence
* the given CharSequence
* @return true if given CharSequence can be encoded by this
* encoder
* @throws IllegalStateException
- * if current internal status is neigher RESET or FLUSH
+ * if current internal status is neither RESET or FLUSH
*/
public boolean canEncode(CharSequence sequence) {
CharBuffer cb;
@@ -310,7 +310,7 @@
/**
* This is a facade method for encoding operation.
* - * This method encodes the remaning character sequence of the given + * This method encodes the remaining character sequence of the given * character buffer into a new byte buffer. This method performs a complete * encoding operation, resets at first, then encodes, and flushes at last. *
@@ -335,7 +335,7 @@ * error is * {@link CodingErrorAction#REPORT CodingErrorAction.REPORT}. * Unmappable means the Unicode character sequence at the input - * buffer's current postion cannot be mapped to a equivalent + * buffer's current position cannot be mapped to a equivalent * byte sequence. * @throws CharacterCodingException * if other exception happened during the encode operation @@ -379,7 +379,7 @@ } ByteBuffer truncatedBuffer = null; // truncate elements after limit in the output. - // clippedBuffer has the same value of capcity and limit. + // clippedBuffer has the same value of capacity and limit. if (output.limit() == output.capacity()) { truncatedBuffer = output; } else { @@ -418,10 +418,10 @@ /** * Encodes characters starting at the current position of the given input * buffer, and writes the equivalent byte sequence into the given output - * buffer from its current postion. + * buffer from its current position. ** The buffers' position will be changed with the reading and writing - * operation, but their limis and marks will be kept intact. + * operation, but their limits and marks will be kept intact. *
*
* A CoderResult instance will be returned according to
@@ -429,7 +429,7 @@
*
CoderResult
* is same as the {@link #encode(CharBuffer, ByteBuffer, boolean) encode}.
* When exception encountered in the encoding operation, most implementation
- * of this mehtod will return a relevant result object to
+ * of this method will return a relevant result object to
* {@link #encode(CharBuffer, ByteBuffer, boolean) encode} method, and some
* performance optimized implementation may handle the exception and
* implement the error action itself.
*
- * The buffers are scanned from their current positions, and their postions
+ * The buffers are scanned from their current positions, and their positions
* will be modified accordingly, while their marks and limits will be
* intact. At most {@link CharBuffer#remaining() in.remaining()} characters
* will be read, and {@link ByteBuffer#remaining() out.remaining()} bytes
@@ -628,7 +628,7 @@
* CoderResult.OVERFLOW will be returned, and this method
* must be called again with a byte buffer has more spaces. Otherwise this
* method will return CoderResult.UNDERFLOW, which means one
- * encoding process has been completed sucessfully.
+ * encoding process has been completed successfully.
*
* During the flush, the output buffer's position will be changed
* accordingly, while its mark and limit will be intact.
@@ -657,7 +657,7 @@
}
/**
- * Flush this encoder. Default implementaion does nothing and always return
+ * Flush this encoder. Default implementation does nothing and always return
* CoderResult.UNDERFLOW, and this method can be overridden
* if needed.
*
@@ -672,7 +672,7 @@
/**
* Notify that this encoder's CodingErrorAction specified for
- * malformed input error has been changed. Default implementaion does
+ * malformed input error has been changed. Default implementation does
* nothing, and this method can be overridden if needed.
*
* @param newAction
@@ -684,7 +684,7 @@
/**
* Notify that this encoder's CodingErrorAction specified for
- * unmappable character error has been changed. Default implementaion does
+ * unmappable character error has been changed. Default implementation does
* nothing, and this method can be overridden if needed.
*
* @param newAction
@@ -696,7 +696,7 @@
/**
* Notify that this encoder's replacement has been changed. Default
- * implementaion does nothing, and this method can be overridden if needed.
+ * implementation does nothing, and this method can be overridden if needed.
*
* @param newReplacement
* the new replacement string
@@ -706,7 +706,7 @@
}
/**
- * Reset this encoder's charset related state. Default implementaion does
+ * Reset this encoder's charset related state. Default implementation does
* nothing, and this method can be overridden if needed.
*/
protected void implReset() {
@@ -720,7 +720,7 @@
* The given byte array is legal if and only if it can be decode into
* sixteen bits Unicode characters.
*
- * This method can be overriden for performance improvement.
+ * This method can be overridden for performance improvement.
*
* @param repl
* the given byte array to be checked
@@ -747,10 +747,10 @@
/**
* Gets this encoder's CodingErrorAction when malformed input
- * occured during encoding process.
+ * occurred during encoding process.
*
* @return this encoder's CodingErrorAction when malformed
- * input occured during encoding process.
+ * input occurred during encoding process.
*/
public CodingErrorAction malformedInputAction() {
return malformAction;
@@ -843,7 +843,7 @@
* @return this encoder
* @throws IllegalArgumentException
* if the given replacement cannot satisfy the requirement
- * metioned above
+ * mentioned above
*/
public final CharsetEncoder replaceWith(byte[] replacement) {
if (null == replacement || 0 == replacement.length
@@ -872,10 +872,10 @@
/**
* Gets this encoder's CodingErrorAction when unmappable
- * character occured during encoding process.
+ * character occurred during encoding process.
*
* @return this encoder's CodingErrorAction when unmappable
- * character occured during encoding process.
+ * character occurred during encoding process.
*/
public CodingErrorAction unmappableCharacterAction() {
return unmapAction;
Index: src/main/java/java/nio/charset/spi/CharsetProvider.java
===================================================================
--- src/main/java/java/nio/charset/spi/CharsetProvider.java (revision 483460)
+++ src/main/java/java/nio/charset/spi/CharsetProvider.java (working copy)
@@ -34,7 +34,7 @@
*
* @throws SecurityException
* if there is a security manager installed that does not permit
- * the runtime permission labelled "charsetProvider".
+ * the runtime permission labeled "charsetProvider".
*/
protected CharsetProvider() {
SecurityManager securityManager = System.getSecurityManager();
Index: src/main/java/java/nio/charset/CoderResult.java
===================================================================
--- src/main/java/java/nio/charset/CoderResult.java (revision 483460)
+++ src/main/java/java/nio/charset/CoderResult.java (working copy)
@@ -36,7 +36,7 @@
* units has been encountered. Get an instance of this type of result by calling
* CoderResult.malformedForLength(int) with the length of the
* malformed-input.
- * CoderResult.unmappableForLength(int) with the input
* sequence size indicating the identity of the unmappable character.