WriteBytes
来源:互联网 发布:windows无法打开打印机 编辑:程序博客网 时间:2024/06/06 20:59
/** * Use FileOutputStream to write the bytes to a file. */package FileIO;import java.io.*;/** * @author Administrator * */public class WriteBytes {/** * @param args */public static void main(String[] args) {// This array contains the ASCII code for the// letters A through J.byte[] vals = { 65, 66, 67, 68, 69, 70, 71, 72, 73, 74 };FileOutputStream fout;try {// Open output file.fout = new FileOutputStream("Test.dat");} catch (FileNotFoundException exc) {System.out.println("Error Opening Output File");return ;}try {// Write every other value in the vals array to the file./*for (int i = 0; i < vals.length; ++i)fout.write(vals[i]);*/fout.write(vals);} catch (IOException exc) {System.out.println("Error Writing File");}try {fout.close();} catch (IOException exc) {System.out.println("Error Closing File");}}}
0 0
- WriteBytes
- writeBytes()存在的问题
- DataOutputStream的writeBytes(String s)
- ByteBuf UnpooledUnsafeDirectByteBuf(AbstractByteBuf).writeBytes(byte[])
- Java.io.DataOutputStream.writeBytes()方法实例
- RandomAccessFile 类中的 writeBytes/writeChars/writeUTF 方法区别
- java运行shell命令时DataOutputStream.writeBytes异常
- JAVA方法DataOutputStream.writeBytes(String s)传递中文乱码问题
- QDataStream写文件操作-writeBytes与writeRawData区别
- JAVA方法DataOutputStream.writeBytes(String s)传递中文乱码问题
- DataOutputStream 的 writeBytes(String s) 方法在向输出流写入中文字
- Java中write(int)和writeInt(int)的区别,writeBytes(String) 和writeChars(String) 区别
- Java Web 学习笔记之六 DataOutputStream方法writeBytes(String s)方法中文乱码问题
- Mongodb数据库操作
- jRange滑动选取数值范围插件
- 分词驱动的parser vs. meta character驱动
- 最新测试结果
- linux常见命令
- WriteBytes
- 检查点
- 如何解决每次打开office2010都会出现正在配置
- POJ 3189 最大流 枚举
- 资源
- Using HDInsight tools to optimize hive script
- mac 下从设置启动mysql 失败,“Warning:The /usr/local/mysql/data directory is not owned by the 'mysql' or '_mys
- Mysql数据库运行过程中突然崩溃:The server quit without updating PID file
- 南邮编程在线编程题七:求平均值