クライアント側 (iPad) でファイル ダウンロード phonegap を使用して、インターネットから画像ファイルをダウンロードしています。次に、Java サーバーを介して画像を送信する必要があります。として画像を送信してstream
いますが、クライアント側にはファイルが必要です。画像ファイルをストリームとして送信すると、画像ファイルがダウンロードされていないことを意味します。を使用せずに画像ファイルをファイルとして送信するにはどうすればよいsockets
ですか?
私のサーバー側のコードは次のとおりです。
String file_location=request.getQueryString();
String[] splitable=file_location.split("&");
String[] document_name=splitable[0].split("=");
String[] document_page=splitable[1].split("=");
PDFDocumentManag er documentManager;
try
{
ServletOutputStream out = response.getOutputStream();
//String location=loadClass.fileLocation(document_name[1]);
String location="D:/Processing/893210.pdf";
documentManager = new PDFDocumentManager(new File(location));
documentManager.setPageNum(Integer.parseInt(document_page[1]));
response.setContentType("image/gif");
ImageIO.write(documentManager.getImage(), "gif", new File("D:/testing/out.gif"));
}