File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
src/main/java/org/scijava/io/handle Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -594,6 +594,12 @@ default void writeByte(final int v) throws IOException {
594594 write (v );
595595 }
596596
597+ @ Override
598+ default void writeShort (final int v ) throws IOException {
599+ write ((v >>> 8 ) & 0xFF );
600+ write ((v >>> 0 ) & 0xFF );
601+ }
602+
597603 @ Override
598604 default void writeChar (final int v ) throws IOException {
599605 write ((v >>> 8 ) & 0xFF );
@@ -635,6 +641,16 @@ default void writeBytes(final String s) throws IOException {
635641 write (s .getBytes ("UTF-8" ));
636642 }
637643
644+ @ Override
645+ default void writeChars (final String s ) throws IOException {
646+ final int len = s .length ();
647+ for (int i = 0 ; i < len ; i ++) {
648+ final int v = s .charAt (i );
649+ write ((v >>> 8 ) & 0xFF );
650+ write ((v >>> 0 ) & 0xFF );
651+ }
652+ }
653+
638654 @ Override
639655 default void writeUTF (final String str ) throws IOException {
640656 final byte [] b = str .getBytes ("UTF-8" );
You can’t perform that action at this time.
0 commit comments