import java.io.*;
public class NewApp006 {
public static void main(String[] args)
{
try
{
InputStreamReader vInputStreamReader = new InputStreamReader(System.in);
BufferedReader vBufferedReader = new BufferedReader(vInputStreamReader);
System.out.println("请输入文本,按回车结束:");
String sInput = vBufferedReader.readLine();
sInput = "\r\n"+sInput;
String sFile = "D:\\temp\\test.txt";
RandomAccessFile vRandomAccessFile = new RandomAccessFile(sFile,"rw");
long lLen = vRandomAccessFile.length();
vRandomAccessFile.seek(lLen);
vRandomAccessFile.writeBytes(sInput);
vRandomAccessFile.close();
}
catch(Exception e)
{
System.out.println("系统发生错误。");
}
System.out.println("程序结束。");
}
}
r00_a2lBUR
- 粉丝: 40
- 资源: 131
最新资源
- (源码)基于SSM框架的大学消息通知系统服务端.zip
- (源码)基于Java Servlet的学生信息管理系统.zip
- (源码)基于Qt和AVR的FestosMechatronics系统终端.zip
- (源码)基于Java的DVD管理系统.zip
- (源码)基于Java RMI的共享白板系统.zip
- (源码)基于Spring Boot和WebSocket的毕业设计选题系统.zip
- (源码)基于C++的机器人与船舶管理系统.zip
- (源码)基于WPF和Entity Framework Core的智能货架管理系统.zip
- SAP Note 532932 FAQ Valuation logic with active material ledger
- (源码)基于Spring Boot和Redis的秒杀系统.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈