< prev index next >

src/java.base/share/classes/jdk/internal/jimage/UTF8String.java

Print this page

        

*** 256,269 **** } } @Override public String toString() { ! ByteBuffer buffer = ByteBuffer.allocate(bytes.length+2); buffer.order(ByteOrder.BIG_ENDIAN); ! buffer.putShort((short)bytes.length); ! buffer.put(bytes); ByteArrayInputStream stream = new ByteArrayInputStream(buffer.array()); DataInputStream in = new DataInputStream(stream); try { return in.readUTF(); } catch (IOException ex) { --- 256,269 ---- } } @Override public String toString() { ! ByteBuffer buffer = ByteBuffer.allocate(count+2); buffer.order(ByteOrder.BIG_ENDIAN); ! buffer.putShort((short)count); ! buffer.put(bytes, offset, count); ByteArrayInputStream stream = new ByteArrayInputStream(buffer.array()); DataInputStream in = new DataInputStream(stream); try { return in.readUTF(); } catch (IOException ex) {
< prev index next >