public static NSData nsDataFromFile( String filePath ) throws
FileNotFoundException, IOException {
File theFile = new File( filePath );
return new NSData( new FileInputStream( theFile ), (int)
theFile.length() );
}
It doesn't appear that new NSData(InputStream, int) closes the
stream ... Curiously, new NSData(file) DOES, but that's deprecated.
You may want to make this:
File theFile = new File(filePath);
FileInputStream theFileStream = new FileInputStream(theFile);
try {
return new NSData(theFileStream, (int)theFile.length());
}
finally {
theFileStream.close();
}
ms _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]