Posted By:
chi_ts_chi_ts
Posted On:
Thursday, March 6, 2003 10:17 AM
I would like to ask: Can the following code "os.write" and "os.flush" be used to write a string into varible PostData? Thank you very much. Here is the code: public void openOutputConnection(String url,String outchars) throws IOException{ OutputConnection c = null; OutputStream os = null; try{ c=(OutputConnection)Connector.open(url); os=c.openOutputStream(); byte[] postData= data.getBytes(); os.write(postData); os.flush(); } catch(IOException ioe){ ... }
More>>
I would like to ask: Can the following code "os.write" and "os.flush" be used to write a string into varible PostData? Thank you very much.
Here is the code:
public void openOutputConnection(String url,String outchars) throws IOException{
OutputConnection c = null;
OutputStream os = null;
try{
c=(OutputConnection)Connector.open(url);
os=c.openOutputStream();
byte[] postData= data.getBytes();
os.write(postData);
os.flush();
}
catch(IOException ioe){
...
}
<<Less