Skip to content

Commit efe3223

Browse files
ctruedengab1one
authored andcommitted
DataHandle: simplify writeUTF method
Now it leans on the Java standard library (indirectly).
1 parent 601f144 commit efe3223

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/main/java/org/scijava/io/DataHandle.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -651,9 +651,7 @@ default void writeChars(final String s) throws IOException {
651651

652652
@Override
653653
default void writeUTF(final String str) throws IOException {
654-
final byte[] b = str.getBytes("UTF-8");
655-
writeShort(b.length);
656-
write(b);
654+
DataHandles.writeUTF(str, this);
657655
}
658656

659657
}

0 commit comments

Comments
 (0)