public byte[] read(File file, long offset, int length) throws IOException { FileInputStream inputStream = new FileInputStream(file); inputStream.skip(offset); byte[] buffer = new byte[length]; inputStream.read(buffer, 0, length); inputStream.close(); return buffer; }

将以下kotlin代码转java语言fun Filereadoffset Long length Int ByteArray val inputStream = FileInputStreamthis inputStreamskipoffset val buffer = ByteArraylength inputStreamreadbuffer 0 length inputStreamclose

原文地址: https://www.cveoy.top/t/topic/hI7E 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录