Click here to Skip to main content
12,623,027 members (29,051 online)
   

Java

 
AnswerRe: am a beginner Pin
Richard MacCutchan15-Jan-13 23:54
mvpRichard MacCutchan15-Jan-13 23:54 
GeneralRe: am a beginner Pin
cubocik16-Jan-13 1:38
membercubocik16-Jan-13 1:38 
GeneralRe: am a beginner Pin
Richard MacCutchan16-Jan-13 1:52
mvpRichard MacCutchan16-Jan-13 1:52 
GeneralRe: am a beginner Pin
cubocik16-Jan-13 1:55
membercubocik16-Jan-13 1:55 
GeneralRe: am a beginner Pin
onyebumichael16-Jan-13 12:03
grouponyebumichael16-Jan-13 12:03 
AnswerRe: am a beginner Pin
April Fans16-Jan-13 20:46
memberApril Fans16-Jan-13 20:46 
GeneralRe: am a beginner Pin
Richard MacCutchan17-Jan-13 0:40
mvpRichard MacCutchan17-Jan-13 0:40 
Questionhelp me please Pin
terzasek13-Jan-13 18:10
memberterzasek13-Jan-13 18:10 
how to write main class for run this class.
1. edit this class.
2. create main class for run
I need to write , read text file path C:\\file.txt
anyone help me please.

package
import java.io.*;

public class TextFileOperator {
public TextFileOperator(String path){
f = new File(path);
}
File f;
public void write(String text, boolean isAppend){
FileOutputStream out = new FileOutputStream(f,isAppend);
OutputStreamWriter wr = new OutputStreamWriter(out);
wr.write(text);
wr.close();
out.close();
}
public String read()
{
FileReader reader = new FileReader(f);
BufferedReader bf = new BufferedReader(reader);
StringBuilder bd = new StringBuilder();
String s;
while((s = bf.readLine()) != null){
bd.append(s);
bd.append("\n");
}
return bd.toString();
}
}
AnswerRe: help me please Pin
Richard MacCutchan13-Jan-13 23:23
mvpRichard MacCutchan13-Jan-13 23:23 
AnswerRe: help me please Pin
Avidwan14-Jan-13 5:41
memberAvidwan14-Jan-13 5:41 
GeneralRe: help me please Pin
Richard MacCutchan14-Jan-13 7:22
mvpRichard MacCutchan14-Jan-13 7:22 
GeneralRe: help me please Pin
cubocik16-Jan-13 1:40
membercubocik16-Jan-13 1:40 
QuestionWebpage saver -- help Pin
cubocik13-Jan-13 8:38
membercubocik13-Jan-13 8:38 
SuggestionRe: Webpage saver -- help Pin
Richard MacCutchan13-Jan-13 23:18
mvpRichard MacCutchan13-Jan-13 23:18 
GeneralRe: Webpage saver -- help Pin
cubocik14-Jan-13 6:51
membercubocik14-Jan-13 6:51 
GeneralRe: Webpage saver -- help Pin
Richard MacCutchan14-Jan-13 7:12
mvpRichard MacCutchan14-Jan-13 7:12 
GeneralRe: Webpage saver -- help Pin
cubocik14-Jan-13 7:34
membercubocik14-Jan-13 7:34 
GeneralRe: Webpage saver -- help Pin
cubocik14-Jan-13 7:39
membercubocik14-Jan-13 7:39 
GeneralRe: Webpage saver -- help Pin
Richard MacCutchan14-Jan-13 7:55
mvpRichard MacCutchan14-Jan-13 7:55 
GeneralRe: Webpage saver -- help Pin
cubocik14-Jan-13 8:55
membercubocik14-Jan-13 8:55 
GeneralRe: Webpage saver -- help Pin
Richard MacCutchan14-Jan-13 23:02
mvpRichard MacCutchan14-Jan-13 23:02 
GeneralRe: Webpage saver -- help Pin
cubocik16-Jan-13 1:38
membercubocik16-Jan-13 1:38 
GeneralRe: Webpage saver -- help Pin
Richard MacCutchan16-Jan-13 1:51
mvpRichard MacCutchan16-Jan-13 1:51 
QuestionHow to Record Audio at client Side? Pin
Mrugrajsinh13-Jan-13 8:19
memberMrugrajsinh13-Jan-13 8:19 
Questioncode error Pin
Member 975139812-Jan-13 13:47
memberMember 975139812-Jan-13 13:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.161128.1 | Last Updated 4 Dec 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid