zno2

随笔分类 -  java io

java.sql.Blob 转为 java.io.File
摘要:InputStream ins = blob.getBinaryStream(); // 输出到文件 File file = new File("E://test/a.pdf"); OutputStream fos = new FileOutputStream(file); // 下面将BLOB数据 阅读全文

posted @ 2023-06-06 13:19 zno2 阅读(104) 评论(0) 推荐(0)

不能直接从jar 读取文件
摘要:What is a file? https://www.computerhope.com/jargon/f/file.htm 文件的权限 delete,execute,read,write,readlink abc.jar 是一个file abc.jar!\test.xml 不是一个file,因为在 阅读全文

posted @ 2023-06-06 13:18 zno2 阅读(40) 评论(0) 推荐(0)

查找某文件夹下所有java文件(包括子文件下的文件)
摘要:<dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>2.0</version> </dependency> import java.io.File; import java.i 阅读全文

posted @ 2023-06-01 17:06 zno2 阅读(119) 评论(0) 推荐(0)

String 、 StringBuffer 和 StringBuilder
摘要:StringBuffer (一个线程安全的可变字符串序列,用于多线程) A thread-safe, mutable sequence of characters. StringBuilder (可变字符串序列,是StringBuffer用于单线程时的替代,效率高) A mutable sequen 阅读全文

posted @ 2016-08-05 18:46 zno2 阅读(175) 评论(0) 推荐(0)

IO 之 InputStream 和 Reader
摘要:package java.io; // Representing an input stream of bytes. public abstract class InputStream implements Closeable // Abstract class for reading charac 阅读全文

posted @ 2016-08-05 18:45 zno2 阅读(172) 评论(0) 推荐(0)

导航