mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-18 17:09:23 +00:00
removed unnecessary string=>utf8 byte[]=>input stream=>reader converts, utf8 helper added (UnsupportedEndodingException should not thrown)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.jpexs.decompiler.flash.flv;
|
||||
|
||||
import com.jpexs.helpers.utf8.Utf8Helper;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.List;
|
||||
@@ -137,15 +138,15 @@ public class FLVOutputStream extends OutputStream {
|
||||
}
|
||||
|
||||
public void writeSCRIPTDATASTRING(String s) throws IOException {
|
||||
int len = s.getBytes("UTF-8").length;
|
||||
writeUI16(len);
|
||||
write(s.getBytes("UTF-8"));
|
||||
byte[] bytes = Utf8Helper.getBytes(s);
|
||||
writeUI16(bytes.length);
|
||||
write(bytes);
|
||||
}
|
||||
|
||||
public void writeSCRIPTDATALONGSTRING(String s) throws IOException {
|
||||
int len = s.getBytes("UTF-8").length;
|
||||
writeUI32(len);
|
||||
write(s.getBytes("UTF-8"));
|
||||
byte[] bytes = Utf8Helper.getBytes(s);
|
||||
writeUI32(bytes.length);
|
||||
write(bytes);
|
||||
}
|
||||
|
||||
private void writeLong(long value) throws IOException {
|
||||
|
||||
Reference in New Issue
Block a user