mirror of
https://github.com/twiglet/cs2j.git
synced 2025-01-18 13:15:17 +01:00
add ascii encoder
This commit is contained in:
parent
91608a3344
commit
abc4163a86
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
|
|
||||||
This file is
|
This file is
|
||||||
@ -32,12 +32,19 @@
|
|||||||
<Imports>
|
<Imports>
|
||||||
<Import>CS2JNet.System.Text.EncodingSupport</Import>
|
<Import>CS2JNet.System.Text.EncodingSupport</Import>
|
||||||
</Imports>
|
</Imports>
|
||||||
<Java>(new EncodingSupport("UTF-8"))</Java>
|
|
||||||
<Type>System.Text.Encoding</Type>
|
<Type>System.Text.Encoding</Type>
|
||||||
<Name>UTF8</Name>
|
<Name>UTF8</Name>
|
||||||
<Get>(new EncodingSupport("UTF-8"))</Get>
|
<Get>EncodingSupport.GetEncoder("UTF-8")</Get>
|
||||||
<Set>${this:16}.setUTF8(${value})</Set>
|
<Set>${this:16}.setUTF8(${value})</Set>
|
||||||
</Property>
|
</Property>
|
||||||
|
<Property>
|
||||||
|
<Imports>
|
||||||
|
<Import>CS2JNet.System.Text.EncodingSupport</Import>
|
||||||
|
</Imports>
|
||||||
|
<Type>System.Text.Encoding</Type>
|
||||||
|
<Name>ASCII</Name>
|
||||||
|
<Get>EncodingSupport.GetEncoder("ASCII")</Get>
|
||||||
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
<Events />
|
<Events />
|
||||||
<Indexers />
|
<Indexers />
|
||||||
|
@ -16,4 +16,8 @@ public class EncodingSupport {
|
|||||||
public String getString() {
|
public String getString() {
|
||||||
return coding;
|
return coding;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static EncodingSupport GetEncoder(String coding) {
|
||||||
|
return new EncodingSupport(coding);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user