/** * Write the start of a file multipart, up to the point where the * actual file content should be written */ private void writeStartFileMultipart(OutputStream out, String filename, String nameField, String mimetype) throws IOException { write(out, "Content-Disposition: form-data; name=\""); // $NON-NLS-1$ write(out, nameField); write(out, "\"; filename=\"");// $NON-NLS-1$ write(out, new File(filename).getName()); writeln(out, "\""); // $NON-NLS-1$ writeln(out, "Content-Type: " + mimetype); // $NON-NLS-1$ writeln(out, "Content-Transfer-Encoding: binary"); // $NON-NLS-1$ out.write(CRLF); }