*/
transaction.setStatus(resource.isNull() ? 201 : 204);
/* Open the streams for reading and writing */
InputStream in = transaction.getInputStream();
VFSOutputStream out = resource.getOutputStream();
/* Write the content from the PUT to the specified resource */
try {
byte buffer[] = new byte[32768];
int k = -1;
while (in!=null && (k = in.read(buffer)) != -1)
out.write(buffer, 0, k);
out.close();
} finally {
out.abort();
}
resource.getMount().resourceUpload(resource, transaction, null);
} catch (Exception e) {
resource.getMount().resourceUpload(resource, transaction, e);
IOException ioe = new IOException(e.getMessage());