Updating CharsetEncoder.java
@@ -33,6 +33,8 @@ import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import java.nio.BufferOverflowException;
import java.nio.BufferUnderflowException;
+import java.lang.ref.WeakReference;
+import java.nio.charset.CoderMalfunctionError; // javadoc
import java.util.Arrays;
@@ -195,12 +197,9 @@ public abstract class CharsetEncoder {
* This constructor is for subclasses to specify whether {@code replacement} can be used as it
* is ("trusted"). If it is trusted, {@link #replaceWith(byte[])} and
* {@link #implReplaceWith(byte[])} will not be called.
+ * @hide
*/
- // J2ObjC: Added protected access for the encoder in com.google.j2objc.nio.charset.
- protected CharsetEncoder(Charset cs,
- float averageBytesPerChar,
- float maxBytesPerChar,
- byte[] replacement,
+ protected CharsetEncoder(Charset cs, float averageBytesPerChar, float maxBytesPerChar, byte[] replacement,
boolean trusted)
{
// END Android-added: A hidden constructor for the CharsetEncoderICU subclass.
