codice:
String toservlet = "http://"+ip+":"+port+"/ObjectServlet";
URL servleturl = new URL(toservlet);
URLConnection servletconnection = servleturl.openConnection();
servletconnection.setDoInput(true);
servletconnection.setDoOutput(true);
servletconnection.setUseCaches(false);
servletconnection.setDefaultUseCaches(false);
DataOutputStream out=new DataOutputStream(servletconnection.getOutputStream());
while( (bytesread = in.read( buf )) > -1 )
{
out.write( buf, 0, bytesread );
}
out.flush();
out.close();
in.close();
giovani questo è il mio codice per il passaggio del file!!
ora dovrei passare un parametro però non ho idea di dove posso accodarlo! non vorrei che inserendolo nello stream mi dia problemi con il file! help me please