CGI-BBS > CGI > Perl > HttpConnectionのOutputStreamを読み取りたい。


カレッヂ
カレッヂ


質問者 はり  投稿日 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

プロバイダ参照:
サーバのOS:(未選択)
パソコンのOS:(未選択)
エディタ:
FTPソフト:
サーバ移転:していない
改造:(未選択)
CGI習熟度:(未選択)

返信(回答)する

 


Web裏技