info.aduna.gee.publication.net
Class MultiPartFormData
java.lang.Object
info.aduna.gee.publication.net.MultiPartFormData
public class MultiPartFormData
- extends Object
A quick-and-dirty, Zpad specific, implementation of multipart/form-data creation.
This class is compatible with the quick-and-dirty, Zpad specific, implementation of
multipart/form-data decoding at the server side.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_boundary
protected static String _boundary
- The boundary used.
MultiPartFormData
public MultiPartFormData()
createMpFormData
public static byte[] createMpFormData(WProperties headers,
WProperties options)
- See Also:
full createMpFormData
createMpFormData
public static byte[] createMpFormData(WProperties headers,
WProperties options,
String fileFieldName,
String fileName,
byte[] fileContents)
- Encode (optional) name/value pairs and an (optional) file into a
byte array using the multipart/form-data encoding. The headers to
be set (urlConn.setRequestProperty()) are returned in the headers
parameter.
Note: the resulting multipart/form-data should contain at least one
option or a file part, it's unlegal when it's completely empty.
- Parameters:
headers - "return parameter": headers are returnedoptions - the name/value pairs to be set, or nullfileFieldName - the name of the form field of the file, or nullfileName - the name of the file (ignored in case fileFieldName is null)fileContents - the contents of the file (ignored in case fileFieldName is null)
_getBytes
protected static byte[] _getBytes(String s)
- Convert String to byte array.
Copyright © 1997-2008 Aduna. All Rights Reserved.