[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[udig-devel] [jira] Created: (UDIG-550) Null Pointer Exception
|
Null Pointer Exception
----------------------
Key: UDIG-550
URL: http://jira.codehaus.org/browse/UDIG-550
Project: uDIG
Type: Bug
Components: API libs
Versions: UDIG 1.0.RC5
Environment: win-XP,jdk1.4.2_08
Reporter: amit wadhwa
Assigned to: David Zwiers
Priority: Trivial
This code compiles properly by grrovyc Copy.grooy
,But when i run this file with groovy Copy.groovy,then this code generates java.lang.NullPointerException at Copy.main.
the same program with java works fine.
import java.io.*;
import java.lang.*;
public class Copy
{
public static void main(args)
{
File inputFile = new File("C:\\reader.txt")
File outputFile = new File("C:\\writer.txt")
FileInputStream infile = new FileInputStream (inputFile)
FileOutputStream outfile = new FileOutputStream (outputFile)
byte[] buffer = new byte[16];
int num = 1
num = infile.read(buffer)
outfile.write (buffer,0,num)
outfile.close()
infile.close()
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira