From e4790b8b08432a377b2e5f4c9c3cca12055112ae Mon Sep 17 00:00:00 2001 From: wenshao Date: Tue, 14 Jan 2025 00:51:31 +0800 Subject: [PATCH] putIntLE --- .../java/com/alibaba/fastjson2/JSONWriterUTF8.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/com/alibaba/fastjson2/JSONWriterUTF8.java b/core/src/main/java/com/alibaba/fastjson2/JSONWriterUTF8.java index a45270574c..3134bf9b01 100644 --- a/core/src/main/java/com/alibaba/fastjson2/JSONWriterUTF8.java +++ b/core/src/main/java/com/alibaba/fastjson2/JSONWriterUTF8.java @@ -3001,16 +3001,16 @@ public final int flushTo(OutputStream out, Charset charset) throws IOException { } static void writeEscapedChar(byte[] bytes, int off, int c0) { - putShortLE(bytes, off, ESCAPED_CHARS[c0 & 0x7f]); + IOUtils.putShortLE(bytes, off, ESCAPED_CHARS[c0 & 0x7f]); } static void writeU4Hex2(byte[] bytes, int off, int c) { - putIntUnaligned(bytes, off, U4); - putShortUnaligned(bytes, off + 4, hex2(c)); + IOUtils.putIntUnaligned(bytes, off, U4); + IOUtils.putShortLE(bytes, off + 4, hex2(c)); } static void writeU4HexU(byte[] bytes, int off, int c) { - putShortUnaligned(bytes, off, U2); - putIntUnaligned(bytes, off + 2, hex4U(c)); + IOUtils.putShortUnaligned(bytes, off, U2); + IOUtils.putIntLE(bytes, off + 2, hex4U(c)); } }