mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-26 21:35:16 +00:00
SWFOutputStream correct charset handling when saving NetString (font names)
This commit is contained in:
@@ -198,23 +198,10 @@ public class SWFOutputStream extends OutputStream {
|
||||
* @throws IOException
|
||||
*/
|
||||
public void writeNetString(String value) throws IOException {
|
||||
byte[] data = value.getBytes();
|
||||
writeUI8(data.length);
|
||||
write(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes netstring (length + string) value to the stream
|
||||
*
|
||||
* @param value String value
|
||||
* @param charset
|
||||
* @throws IOException
|
||||
*/
|
||||
public void writeNetString(String value, Charset charset) throws IOException {
|
||||
byte[] data = value.getBytes(charset);
|
||||
writeUI8(data.length);
|
||||
write(data);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes UI32 (Unsigned 32bit integer) value to the stream
|
||||
|
||||
Reference in New Issue
Block a user