This is the code creating a client in Socket Programming for transferring big files.
I dont know if this works cos it always gives me a error:

C.java:47: cannot find symbol
symbol : method read(java.lang.Byte[],int,int)
location: class java.io.DataInputStream
int numRead = in.read(bytes , (int)numRecd ,(int) numThisTime);
^
C.java:51: cannot find symbol
symbol : method write(java.lang.Byte[],int,int)
location: class java.io.FileOutputStream
fos.write(bytes , (int)numRecd , numRead);
^
2 errors

import java.io.*;
import java.net.*;
import java.lang.*;

class C{

public static void main(String[] args) throws IOException
{

int port=6665;
String address = "localhost";

try
{

System.out.println("Client program running...");

InetAddress ip=InetAddress.getByName(address);

Socket socket=new Socket(ip,port);

File f=new File("abc.jpg");

FileOutputStream fos = new FileOutputStream(f);

InputStream sin=socket.getInputStream();

DataInputStream in=new DataInputStream(sin);

//String s=in.readUTF();

long len=in.readLong();

Byte [] bytes=new Byte[(int)len];

long numRecd = 0;

long numToRecieve = len;

while(numRecd < numToRecieve) {

long numThisTime = numToRecieve - numRecd;

numThisTime = numThisTime < bytes.length ? numThisTime : bytes.length;

int numRead = in.read(bytes , (int)numRecd ,(int) numThisTime);

if(numRead == -1 ) break;

fos.write(bytes , (int)numRecd , numRead);

numRecd += numRead;
}

}
catch(Exception x) {
System.out.println("Timed out");
x.printStackTrace();}
}
}

Please Help.