public class ClassA {
private FileOutputStream stream;
public void makeStream (File file) {
try {
stream = new FileOutputStream(file);
} catch(FileNotFoundException fnfe) {
//perform exception handling
}
//do something...
try {
stream.close();
} catch(IOException ioe) {
//perform exception handling
}
}
}
|
|