Skip to content

Commit e702e91

Browse files
committed
DataHandle: simplify writeUTF method
Now it leans on the Java standard library (indirectly).
1 parent 02b18b9 commit e702e91

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

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

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

654654
@Override
655655
default void writeUTF(final String str) throws IOException {
656-
final byte[] b = str.getBytes("UTF-8");
657-
writeShort(b.length);
658-
write(b);
656+
DataHandles.writeUTF(str, this);
659657
}
660658

661659
}

0 commit comments

Comments
 (0)