hello people,

i need from your knowledge. I have a Client program and a Server Program.
I need to send a zip File using socket but i can not. My programs send a File.txt, but i don't know what change them, to make them work.

Please, Help me!!

this is may code from my client who send the File.txt

try {
File f1 = new File ("mine.zip");
FileInputStream fins = new FileInputStream(f1);
byte inputByte = (byte)fins.read();
//byte inputByte = (byte)fins.read();
DataOutputStream out = new DataOutputStream(skCliente.getOutputStream());
System.out.println("client: start sending file ...\n ");
while (inputByte != -1)
{
out.write(inputByte); // write to socket
out.flush();
inputByte=(byte)fins.read();
}

out.close();
System.out.println("File sent to server!");
}catch(Exception e){}
this is my reciving code from my server who save the File.txt

try
{
File f1 = new File ("l_mine.zip");
FileOutputStream fout = new FileOutputStream(f1);
DataInputStream in = new DataInputStream(skCliente.getInputStream());
int inByte = (int)in.read();
System.out.println("\nServer receiving file\n");
while(inByte != -1)
{
fout.write(inByte); //write it to socket's stream
fout.flush();
inByte = (byte)in.read();
System.out.println("server: receiving file bit by bit\n");
}
fout.close();
} catch (IOException e){}

Please, help me, i'll apreciated... :(