int (int fileId, int defaultValue) { Integer value = vfs.readAttributeRaw(fileId, attribute, buffer -> { //stream.writeInt() writes in BIG_ENDIAN (default byte order for JVM) return buffer.order(BIG_ENDIAN).getInt(); }); return value == null ? defaultValue : value.intValue(); }