short (int fileId, short defaultValue) { Short value = vfs.readAttributeRaw(fileId, attribute, buffer -> { //stream.writeShort() writes in BIG_ENDIAN (default byte order for JVM) return buffer.order(BIG_ENDIAN).getShort(); }); return value == null ? defaultValue : value.shortValue(); }