Surjendu,
you can simply send your file like this :
FileRepresentation rep = new FileRepresentation("C:\\input.txt",
MediaType.TEXT_PLAIN, 0);
on server side, if you want to save the file on disk:
storeRepresentation(Representation representation){
OutputStream os = ...;
representation.write(os);
}
regards,
Thierry Boileau
Sending a file:
Client Code:
FileRepresentation rep = new FileRepresentation("C:\\input.txt",
MediaType.MULTIPART_FORM_DATA, 0);
Request request = new Request(Method.PUT,rep);
Response resp = new Client(Protocol.HTTP).handle(request);
My question is how to read the file in handlePut() in my resource class.
Server Code:
public void handlePut()
{
//How to get the File here???
}
Someone please help???