import com.paperinput.PaperInput; public class Main { public static void main(String[] args) { String imagePath = "path/to/your/image.jpg"; try (PaperInput input = new PaperInput(imagePath)) { byte[] imageData = input.read(); } catch (Exception e) { e.printStackTrace(); } } } import com.paperinput.PaperInput; public class Main { public static void main(String[] args) { String textFilePath = "path/to/your/textfile.txt"; try (PaperInput input = new PaperInput(textFilePath)) { String fileContent = input.readAsString(); System.out.println(fileContent); } catch (Exception e) { e.printStackTrace(); } } } import com.paperinput.PaperInput; public class Main { public static void main(String[] args) { String filePath = "path/to/your/file.ext"; try (PaperInput input = new PaperInput(filePath)) { byte[] fileData = input.read(); } catch (Exception e) { e.printStackTrace(); } } }


上一篇:
下一篇:
切换中文