byteBuffer
package com . example ; //import java.nio.ByteBuffer; //導入依賴的package包/類 import java . io . IOException ; import java . nio . ByteBuffer ; import java . nio . CharBuffer ; import java . nio . channels . SeekableByteChannel ; import java . nio . charset . Charset ; import java . nio . charset . StandardCharsets ; import java . nio . file . Files ; import java . nio . file . Path ; import java . nio . file . Paths ; /** * Hello world! * */ public class App { public static void main ( String [] args ) { System . out . println ( "Hello World!" ); //String file="C:\\Work\\Java\\data\\19027835361399637"; Path file = Paths . get ( "C: \\ Work \\ Java \\ data \\ 19027835361399637" ); //Path file = Paths.get(System.getProperty("user.home") + "/test/myfile.txt"); try ( SeekableByteChannel sbc = Files . newByteChannel ( file )) { // |\longremar