diff --git a/CS2JLibrary/NetFramework/System/Text/Encoding.xml b/CS2JLibrary/NetFramework/System/Text/Encoding.xml
index e207c5a..8bbfc1e 100644
--- a/CS2JLibrary/NetFramework/System/Text/Encoding.xml
+++ b/CS2JLibrary/NetFramework/System/Text/Encoding.xml
@@ -26,6 +26,26 @@
GetBytes
System.Byte[]
+
+
+ new String(${buf}, ${index}, ${count}, ${this:16}.getCharset())
+
+
+ System.Byte[]
+ buf
+
+
+ System.Int32
+ index
+
+
+ System.Int32
+ count
+
+
+ GetString
+ System.String
+
diff --git a/CS2JLibrary/src/CS2JNet/System/Text/EncodingSupport.java b/CS2JLibrary/src/CS2JNet/System/Text/EncodingSupport.java
index a1efa0b..d37f89e 100644
--- a/CS2JLibrary/src/CS2JNet/System/Text/EncodingSupport.java
+++ b/CS2JLibrary/src/CS2JNet/System/Text/EncodingSupport.java
@@ -1,6 +1,7 @@
package CS2JNet.System.Text;
import java.io.UnsupportedEncodingException;
+import java.nio.charset.Charset;
public class EncodingSupport {
@@ -17,6 +18,10 @@ public class EncodingSupport {
return coding;
}
+ public Charset getCharset() {
+ return Charset.forName(coding);
+ }
+
public static EncodingSupport GetEncoder(String coding) {
return new EncodingSupport(coding);
}