カレッヂ |
質問者 はり
投稿日 2004/11/25(木) 16:58:50
[削除] (返信・回答が付いた後にこの質問の削除はできません)
J2MEでバイナリの画像ファイルをHttpConnectionのOutputStreamによりサーバへPostします。 サーバのCGIでそのバイナリデータの取り方を教えませんか。 HttpConnectionは以下の例とします。 HttpConnection c = null; InputStream is = null; OutputStream os = null; int rc; c = (HttpConnection)Connector.open(url); // Set the request method and headers c.setRequestMethod(HttpConnection.POST); c.setRequestProperty("If-Modified-Since", "29 Oct 1999 19:43:31 GMT"); c.setRequestProperty("User-Agent", "Profile/MIDP-2.0 Configuration/CLDC-1.0"); c.setRequestProperty("Content-Language", "en-US"); // Getting the output stream may flush the headers os = c.openOutputStream(); os.write("LIST games\n".getBytes()); os.flush(); // Optional, getResponseCode will flush
プロバイダ参照: |
返信(回答)する
Web裏技 |