Move `UTF_8` to `Internal`
diff --git a/java/src/main/java/com/google/protobuf/ByteString.java b/java/src/main/java/com/google/protobuf/ByteString.java
index 04ac7c9..1d5d4e8 100644
--- a/java/src/main/java/com/google/protobuf/ByteString.java
+++ b/java/src/main/java/com/google/protobuf/ByteString.java
@@ -78,8 +78,6 @@
   static final int MIN_READ_FROM_CHUNK_SIZE = 0x100;  // 256b
   static final int MAX_READ_FROM_CHUNK_SIZE = 0x2000;  // 8k
 
-  protected static final Charset UTF_8 = Charset.forName("UTF-8");
-
   /**
    * Empty {@code ByteString}.
    */
@@ -282,7 +280,7 @@
    * @return new {@code ByteString}
    */
   public static ByteString copyFromUtf8(String text) {
-    return new LiteralByteString(text.getBytes(UTF_8));
+    return new LiteralByteString(text.getBytes(Internal.UTF_8));
   }
 
   // =================================================================
@@ -661,7 +659,7 @@
    * @return new string using UTF-8 encoding
    */
   public String toStringUtf8() {
-    return toString(UTF_8);
+    return toString(Internal.UTF_8);
   }
 
   /**
diff --git a/java/src/main/java/com/google/protobuf/CodedInputStream.java b/java/src/main/java/com/google/protobuf/CodedInputStream.java
index b15c273..d201f7c 100644
--- a/java/src/main/java/com/google/protobuf/CodedInputStream.java
+++ b/java/src/main/java/com/google/protobuf/CodedInputStream.java
@@ -373,14 +373,14 @@
     if (size <= (bufferSize - bufferPos) && size > 0) {
       // Fast path:  We already have the bytes in a contiguous buffer, so
       //   just copy directly from it.
-      final String result = new String(buffer, bufferPos, size, ByteString.UTF_8);
+      final String result = new String(buffer, bufferPos, size, Internal.UTF_8);
       bufferPos += size;
       return result;
     } else if (size == 0) {
       return "";
     } else {
       // Slow path:  Build a byte array first then copy it.
-      return new String(readRawBytesSlowPath(size), ByteString.UTF_8);
+      return new String(readRawBytesSlowPath(size), Internal.UTF_8);
     }
   }
 
@@ -409,7 +409,7 @@
     if (!Utf8.isValidUtf8(bytes, pos, pos + size)) {
       throw InvalidProtocolBufferException.invalidUtf8();
     }
-    return new String(bytes, pos, size, ByteString.UTF_8);
+    return new String(bytes, pos, size, Internal.UTF_8);
   }
 
   /** Read a {@code group} field value from the stream. */
diff --git a/java/src/main/java/com/google/protobuf/CodedOutputStream.java b/java/src/main/java/com/google/protobuf/CodedOutputStream.java
index 9994fd3..f5fd58f 100644
--- a/java/src/main/java/com/google/protobuf/CodedOutputStream.java
+++ b/java/src/main/java/com/google/protobuf/CodedOutputStream.java
@@ -420,7 +420,7 @@
     // Unfortunately there does not appear to be any way to tell Java to encode
     // UTF-8 directly into our buffer, so we have to let it create its own byte
     // array and then copy.
-    final byte[] bytes = value.getBytes(ByteString.UTF_8);
+    final byte[] bytes = value.getBytes(Internal.UTF_8);
     writeRawVarint32(bytes.length);
     writeRawBytes(bytes);
   }
@@ -827,7 +827,7 @@
    * {@code string} field.
    */
   public static int computeStringSizeNoTag(final String value) {
-    final byte[] bytes = value.getBytes(ByteString.UTF_8);
+    final byte[] bytes = value.getBytes(Internal.UTF_8);
     return computeRawVarint32Size(bytes.length) +
            bytes.length;
   }
diff --git a/java/src/main/java/com/google/protobuf/Internal.java b/java/src/main/java/com/google/protobuf/Internal.java
index 8a8bcda..b49318e 100644
--- a/java/src/main/java/com/google/protobuf/Internal.java
+++ b/java/src/main/java/com/google/protobuf/Internal.java
@@ -53,6 +53,7 @@
  */
 public class Internal {
 
+  protected static final Charset UTF_8 = Charset.forName("UTF-8");
   protected static final Charset ISO_8859_1 = Charset.forName("ISO-8859-1");
 
   /**
@@ -84,7 +85,7 @@
    * generated code calls this automatically.
    */
   public static String stringDefaultValue(String bytes) {
-    return new String(bytes.getBytes(ISO_8859_1), ByteString.UTF_8);
+    return new String(bytes.getBytes(ISO_8859_1), UTF_8);
   }
 
   /**
@@ -144,7 +145,7 @@
    * without loss.  More precisely, returns {@code true} whenever:
    * <pre>   {@code
    * Arrays.equals(byteString.toByteArray(),
-   *     new String(byteString.toByteArray(), ByteString.UTF_8).getBytes(ByteString.UTF_8))
+   *     new String(byteString.toByteArray(), "UTF-8").getBytes("UTF-8"))
    * }</pre>
    *
    * <p>This method rejects "overlong" byte sequences, as well as
@@ -180,14 +181,14 @@
    * Helper method to get the UTF-8 bytes of a string.
    */
   public static byte[] toByteArray(String value) {
-    return value.getBytes(ByteString.UTF_8);
+    return value.getBytes(UTF_8);
   }
 
   /**
    * Helper method to convert a byte array to a string using UTF-8 encoding.
    */
   public static String toStringUtf8(byte[] bytes) {
-    return new String(bytes, ByteString.UTF_8);
+    return new String(bytes, UTF_8);
   }
 
   /**
diff --git a/java/src/main/java/com/google/protobuf/Utf8.java b/java/src/main/java/com/google/protobuf/Utf8.java
index 5070241..4271b41 100644
--- a/java/src/main/java/com/google/protobuf/Utf8.java
+++ b/java/src/main/java/com/google/protobuf/Utf8.java
@@ -46,7 +46,7 @@
  * <p>The byte sequences considered valid by this class are exactly
  * those that can be roundtrip converted to Strings and back to bytes
  * using the UTF-8 charset, without loss: <pre> {@code
- * Arrays.equals(bytes, new String(bytes, ByteString.UTF_8).getBytes(ByteString.UTF_8))
+ * Arrays.equals(bytes, new String(bytes, Internal.UTF_8).getBytes(Internal.UTF_8))
  * }</pre>
  *
  * <p>See the Unicode Standard,</br>
diff --git a/java/src/test/java/com/google/protobuf/BoundedByteStringTest.java b/java/src/test/java/com/google/protobuf/BoundedByteStringTest.java
index 9c0ff92..1562a1a 100644
--- a/java/src/test/java/com/google/protobuf/BoundedByteStringTest.java
+++ b/java/src/test/java/com/google/protobuf/BoundedByteStringTest.java
@@ -62,7 +62,7 @@
   @Override
   public void testToString() throws UnsupportedEncodingException {
     String testString = "I love unicode \u1234\u5678 characters";
-    LiteralByteString unicode = new LiteralByteString(testString.getBytes(ByteString.UTF_8));
+    LiteralByteString unicode = new LiteralByteString(testString.getBytes(Internal.UTF_8));
     ByteString chopped = unicode.substring(2, unicode.size() - 6);
     assertEquals(classUnderTest + ".substring() must have the expected type",
         classUnderTest, getActualClassName(chopped));
@@ -75,12 +75,12 @@
   @Override
   public void testCharsetToString() throws UnsupportedEncodingException {
     String testString = "I love unicode \u1234\u5678 characters";
-    LiteralByteString unicode = new LiteralByteString(testString.getBytes(ByteString.UTF_8));
+    LiteralByteString unicode = new LiteralByteString(testString.getBytes(Internal.UTF_8));
     ByteString chopped = unicode.substring(2, unicode.size() - 6);
     assertEquals(classUnderTest + ".substring() must have the expected type",
         classUnderTest, getActualClassName(chopped));
 
-    String roundTripString = chopped.toString(ByteString.UTF_8);
+    String roundTripString = chopped.toString(Internal.UTF_8);
     assertEquals(classUnderTest + " unicode bytes must match",
         testString.substring(2, testString.length() - 6), roundTripString);
   }
diff --git a/java/src/test/java/com/google/protobuf/ByteStringTest.java b/java/src/test/java/com/google/protobuf/ByteStringTest.java
index 2eb890d..46c229a 100644
--- a/java/src/test/java/com/google/protobuf/ByteStringTest.java
+++ b/java/src/test/java/com/google/protobuf/ByteStringTest.java
@@ -140,7 +140,7 @@
   public void testCopyFrom_Utf8() throws UnsupportedEncodingException {
     String testString = "I love unicode \u1234\u5678 characters";
     ByteString byteString = ByteString.copyFromUtf8(testString);
-    byte[] testBytes = testString.getBytes(ByteString.UTF_8);
+    byte[] testBytes = testString.getBytes(Internal.UTF_8);
     assertTrue("copyFromUtf8 string must respect the charset",
         isArrayRange(byteString.toByteArray(), testBytes, 0, testBytes.length));
   }
@@ -401,7 +401,7 @@
 
   public void testToStringUtf8() throws UnsupportedEncodingException {
     String testString = "I love unicode \u1234\u5678 characters";
-    byte[] testBytes = testString.getBytes(ByteString.UTF_8);
+    byte[] testBytes = testString.getBytes(Internal.UTF_8);
     ByteString byteString = ByteString.copyFrom(testBytes);
     assertEquals("copyToStringUtf8 must respect the charset",
         testString, byteString.toStringUtf8());
diff --git a/java/src/test/java/com/google/protobuf/CodedOutputStreamTest.java b/java/src/test/java/com/google/protobuf/CodedOutputStreamTest.java
index bb3b03d..365789c 100644
--- a/java/src/test/java/com/google/protobuf/CodedOutputStreamTest.java
+++ b/java/src/test/java/com/google/protobuf/CodedOutputStreamTest.java
@@ -321,7 +321,7 @@
     final int BUFFER_SIZE = 4 * 1024;
     ByteArrayOutputStream outputStream = new ByteArrayOutputStream(BUFFER_SIZE);
     CodedOutputStream codedStream = CodedOutputStream.newInstance(outputStream);
-    byte[] value = "abcde".getBytes(ByteString.UTF_8);
+    byte[] value = "abcde".getBytes(Internal.UTF_8);
     for (int i = 0; i < 1024; ++i) {
       codedStream.writeRawBytes(value, 0, value.length);
     }
@@ -367,7 +367,7 @@
   }
 
   public void testWriteByteBuffer() throws Exception {
-    byte[] value = "abcde".getBytes(ByteString.UTF_8);
+    byte[] value = "abcde".getBytes(Internal.UTF_8);
     ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
     CodedOutputStream codedStream = CodedOutputStream.newInstance(outputStream);
     ByteBuffer byteBuffer = ByteBuffer.wrap(value, 0, 1);
diff --git a/java/src/test/java/com/google/protobuf/IsValidUtf8TestUtil.java b/java/src/test/java/com/google/protobuf/IsValidUtf8TestUtil.java
index d034c06..3203703 100644
--- a/java/src/test/java/com/google/protobuf/IsValidUtf8TestUtil.java
+++ b/java/src/test/java/com/google/protobuf/IsValidUtf8TestUtil.java
@@ -220,8 +220,8 @@
       }
       ByteString bs = ByteString.copyFrom(bytes);
       boolean isRoundTrippable = bs.isValidUtf8();
-      String s = new String(bytes, ByteString.UTF_8);
-      byte[] bytesReencoded = s.getBytes(ByteString.UTF_8);
+      String s = new String(bytes, Internal.UTF_8);
+      byte[] bytesReencoded = s.getBytes(Internal.UTF_8);
       boolean bytesEqual = Arrays.equals(bytes, bytesReencoded);
 
       if (bytesEqual != isRoundTrippable) {
@@ -313,10 +313,10 @@
   void testBytesUsingByteBuffers(
       int numBytes, long expectedCount, long start, long lim)
       throws UnsupportedEncodingException {
-    CharsetDecoder decoder = ByteString.UTF_8.newDecoder()
+    CharsetDecoder decoder = Internal.UTF_8.newDecoder()
         .onMalformedInput(CodingErrorAction.REPLACE)
         .onUnmappableCharacter(CodingErrorAction.REPLACE);
-    CharsetEncoder encoder = ByteString.UTF_8.newEncoder()
+    CharsetEncoder encoder = Internal.UTF_8.newEncoder()
         .onMalformedInput(CodingErrorAction.REPLACE)
         .onUnmappableCharacter(CodingErrorAction.REPLACE);
     byte[] bytes = new byte[numBytes];
diff --git a/java/src/test/java/com/google/protobuf/LiteralByteStringTest.java b/java/src/test/java/com/google/protobuf/LiteralByteStringTest.java
index 4974e9f..7b201a9 100644
--- a/java/src/test/java/com/google/protobuf/LiteralByteStringTest.java
+++ b/java/src/test/java/com/google/protobuf/LiteralByteStringTest.java
@@ -293,21 +293,21 @@
 
   public void testToString() throws UnsupportedEncodingException {
     String testString = "I love unicode \u1234\u5678 characters";
-    LiteralByteString unicode = new LiteralByteString(testString.getBytes(ByteString.UTF_8));
+    LiteralByteString unicode = new LiteralByteString(testString.getBytes(Internal.UTF_8));
     String roundTripString = unicode.toString(UTF_8);
     assertEquals(classUnderTest + " unicode must match", testString, roundTripString);
   }
 
   public void testCharsetToString() throws UnsupportedEncodingException {
     String testString = "I love unicode \u1234\u5678 characters";
-    LiteralByteString unicode = new LiteralByteString(testString.getBytes(ByteString.UTF_8));
-    String roundTripString = unicode.toString(ByteString.UTF_8);
+    LiteralByteString unicode = new LiteralByteString(testString.getBytes(Internal.UTF_8));
+    String roundTripString = unicode.toString(Internal.UTF_8);
     assertEquals(classUnderTest + " unicode must match", testString, roundTripString);
   }
 
   public void testToString_returnsCanonicalEmptyString() throws UnsupportedEncodingException{
     assertSame(classUnderTest + " must be the same string references",
-        ByteString.EMPTY.toString(ByteString.UTF_8), new LiteralByteString(new byte[]{}).toString(ByteString.UTF_8));
+        ByteString.EMPTY.toString(Internal.UTF_8), new LiteralByteString(new byte[]{}).toString(Internal.UTF_8));
   }
 
   public void testToString_raisesException() throws UnsupportedEncodingException{
diff --git a/java/src/test/java/com/google/protobuf/RopeByteStringSubstringTest.java b/java/src/test/java/com/google/protobuf/RopeByteStringSubstringTest.java
index 43872d1..cc38559 100644
--- a/java/src/test/java/com/google/protobuf/RopeByteStringSubstringTest.java
+++ b/java/src/test/java/com/google/protobuf/RopeByteStringSubstringTest.java
@@ -116,7 +116,7 @@
 
     assertEquals(classUnderTest + " from string must have the expected type",
         classUnderTest, getActualClassName(unicode));
-    String roundTripString = unicode.toString(ByteString.UTF_8);
+    String roundTripString = unicode.toString(Internal.UTF_8);
     assertEquals(classUnderTest + " unicode bytes must match",
         testString, roundTripString);
     ByteString flatString = ByteString.copyFromUtf8(testString);
diff --git a/java/src/test/java/com/google/protobuf/RopeByteStringTest.java b/java/src/test/java/com/google/protobuf/RopeByteStringTest.java
index e43df16..bd0d15e 100644
--- a/java/src/test/java/com/google/protobuf/RopeByteStringTest.java
+++ b/java/src/test/java/com/google/protobuf/RopeByteStringTest.java
@@ -135,7 +135,7 @@
 
     assertEquals(classUnderTest + " from string must have the expected type",
         classUnderTest, getActualClassName(unicode));
-    String roundTripString = unicode.toString(ByteString.UTF_8);
+    String roundTripString = unicode.toString(Internal.UTF_8);
     assertEquals(classUnderTest + " unicode bytes must match",
         testString, roundTripString);
     ByteString flatString = ByteString.copyFromUtf8(testString);
@@ -149,7 +149,7 @@
     RopeByteString ropeByteString =
         RopeByteString.newInstanceForTest(ByteString.EMPTY, ByteString.EMPTY);
     assertSame(classUnderTest + " must be the same string references",
-        ByteString.EMPTY.toString(ByteString.UTF_8), ropeByteString.toString(ByteString.UTF_8));
+        ByteString.EMPTY.toString(Internal.UTF_8), ropeByteString.toString(Internal.UTF_8));
   }
 
   public void testToString_raisesException() throws UnsupportedEncodingException{
diff --git a/java/src/test/java/com/google/protobuf/TestUtil.java b/java/src/test/java/com/google/protobuf/TestUtil.java
index 0ce72b5..19a96d0 100644
--- a/java/src/test/java/com/google/protobuf/TestUtil.java
+++ b/java/src/test/java/com/google/protobuf/TestUtil.java
@@ -276,7 +276,7 @@
 
   /** Helper to convert a String to ByteString. */
   static ByteString toBytes(String str) {
-    return ByteString.copyFrom(str.getBytes(ByteString.UTF_8));
+    return ByteString.copyFrom(str.getBytes(Internal.UTF_8));
   }
 
   /**
diff --git a/java/src/test/java/com/google/protobuf/UnknownFieldSetLiteTest.java b/java/src/test/java/com/google/protobuf/UnknownFieldSetLiteTest.java
index 2f6bcd1..e76b4a6 100644
--- a/java/src/test/java/com/google/protobuf/UnknownFieldSetLiteTest.java
+++ b/java/src/test/java/com/google/protobuf/UnknownFieldSetLiteTest.java
@@ -229,7 +229,7 @@
 
   public void testMalformedBytes() throws Exception {
     try {
-      Foo.parseFrom("this is a malformed protocol buffer".getBytes(ByteString.UTF_8));
+      Foo.parseFrom("this is a malformed protocol buffer".getBytes(Internal.UTF_8));
       fail();
     } catch (InvalidProtocolBufferException e) {
       // Expected.