Skip navigation links


COM.FutureTense.Util
Class FormPoster

java.lang.Object
  extended by COM.FutureTense.Util.FormPoster


Deprecated. Use HttpAccess APIs instead

public class FormPoster
extends java.lang.Object

This class allows for the construction and posting of multipart mime encoded messages much as would be sent from a web browser posting the results of an HTML form


Field Summary
static java.lang.String Connect
          Deprecated. CONNECT action
static java.lang.String Delete
          Deprecated. DELETE action
static int ERRORBADRESPONSE
          Deprecated. Error server response did not contain handshake code
static int ERRORFILEIO
          Deprecated. File I/O error
static int ERRORGENERAL
          Deprecated. General error
static int ERRORILLEGALDATAFORACTION
          Deprecated. File data used with Get Method error
static int ERRORNETDISCONNECT
          Deprecated. Error network disconnected
static int ERRORNOCONSERVER
          Deprecated. Error can't connect to server
static int ERRORNOTAUTHENTICATED
          Deprecated. Server certificate does not match what is expected
static int ERRORNOURLPARAM
          Deprecated. Error bad URL input params
static int ERROROUTOFMEMORY
          Deprecated. Error - out of memory reading a server response
static int ERRORSUCCESS
          Deprecated. Error success
static int ERRORTIMEOUT
          Deprecated. Error network timeout forced
static java.lang.String Get
          Deprecated. GET action
static java.lang.String Head
          Deprecated. HEAD action
static java.lang.String HTTP_ACCEPT_CHARSET
          Deprecated.  
static java.lang.String HTTP_ACCEPT_LANGUAGE
          Deprecated.  
static java.lang.String HTTP_ACCEPT_MIME_TYPES
          Deprecated.  
static java.lang.String HTTP_CONNECTION
          Deprecated.  
static java.lang.String HTTP_CONTENT_LENGTH
          Deprecated.  
static java.lang.String HTTP_CONTENT_TYPE
          Deprecated.  
static java.lang.String HTTP_CONTENT_TYPE_CHARSET
          Deprecated.  
static java.lang.String HTTP_EXPIRES
          Deprecated.  
static java.lang.String HTTP_LAST_MODIFIED
          Deprecated.  
static java.lang.String HTTP_POST_FORMMULTIPART
          Deprecated.  
static java.lang.String HTTP_POST_FORMURLENCODED
          Deprecated.  
static java.lang.String HTTP_REFERER
          Deprecated.  
static java.lang.String HTTP_SET_COOKIE
          Deprecated.  
static java.lang.String HTTP_USER_AGENT
          Deprecated.  
static int HTTPRESPONSENOPAGEFOUND
          Deprecated.  
static int HTTPRESPONSENOSERVICE
          Deprecated.  
static int HTTPRESPONSENOTOK
          Deprecated. HTTP Errors...
static int HTTPRESPONSEOK
          Deprecated. HTTP Success
static int HTTPRESPONSETIMEOUT
          Deprecated.  
static int HTTPVERSION10
          Deprecated. HTTP 1.0 flag
static int HTTPVERSION11
          Deprecated. HTTP 1.1 flag
protected  boolean m_bFileDataAdded
          Deprecated.  
protected  byte[] m_byUserBodyData
          Deprecated.  
protected  java.lang.Object m_byUserBodyStream
          Deprecated.  
protected  int m_byUserContentLength
          Deprecated.  
protected  COM.FutureTense.Util.CookieWrapper[] m_Cookies
          Deprecated.  
protected  int m_nLastError
          Deprecated.  
protected  java.lang.StringBuffer m_sbUserTextParams
          Deprecated.  
protected  FTValList m_vlHeaderInfo
          Deprecated.  
static java.lang.String Options
          Deprecated. PUT action
static java.lang.String PATH_INFO
          Deprecated.  
static java.lang.String Post
          Deprecated. POST action
static java.lang.String Put
          Deprecated. PUT action
static java.lang.String REMOTE_ADDR
          Deprecated.  
static java.lang.String REMOTE_HOST
          Deprecated.  
static java.lang.String Trace
          Deprecated. TRACE action
static java.lang.String X_CSRF_TOKEN
          Deprecated.  

 

Constructor Summary
FormPoster()
          Deprecated. Construct a new object for post
FormPoster(boolean panicOnProblem)
          Deprecated.  

 

Method Summary
protected static void addCookieToVector(java.util.Vector vCookies, java.lang.String sName, java.lang.String sValue)
          Deprecated.  
 boolean addFile(java.lang.String sParamName, java.lang.String sValue, java.lang.String sFileName)
          Deprecated. Add a file (upload file path spec) to data for multipart post, as in INPUT TYPE=FILE
 boolean addFile(java.lang.String sParamName, java.lang.String sValue, java.lang.String sFileName, java.lang.String sMIMEType)
          Deprecated. Add a file (upload file path spec) to data for multipart post, as in INPUT TYPE=FILE Allow specifing of mime type string.
 boolean addFileData(java.lang.String sParamName, java.lang.String sFileName, byte[] byData)
          Deprecated. Add file (upload) data via a byte array for multipart post, as in INPUT TYPE=FILE
 boolean addFileData(java.lang.String sParamName, java.lang.String sFileName, byte[] byData, java.lang.String sMIMEType)
          Deprecated. Add file (upload) data via a byte array for multipart post, as in INPUT TYPE=FILE
 boolean addFileData(java.lang.String sParamName, java.lang.String sFileName, java.io.InputStream is)
          Deprecated. Add file (upload) data via a InputStream object for multipart post, as in INPUT TYPE=FILE
 boolean addFileData(java.lang.String sParamName, java.lang.String sFileName, java.io.InputStream is, java.lang.String sMIMEType)
          Deprecated. Add file (upload) data via a InputStream object for multipart post, as in INPUT TYPE=FILE
 boolean addTextValue(java.lang.String sParamName, java.lang.String sValue)
          Deprecated. Adds a name/value pair to the MIME message we're assembling.
 boolean addURL(java.lang.String sParamName, java.lang.String sURL)
          Deprecated. Add a url ("http://" or "https://") to data for multipart post, as in INPUT TYPE=FILE
protected  void buildCookieArray()
          Deprecated.  
 byte[] cleanRawResponse()
          Deprecated. Fetch the raw bytes from the output stream and remove the HTTP header.
 byte[] cleanRawResponse(boolean bRemoveStatus)
          Deprecated. Fetch the raw bytes from the output stream and remove the HTTP header.
 java.lang.String cleanResponse()
          Deprecated. Fetch the string from the output stream and remove the HTTP header.
 java.lang.String cleanResponse(boolean bRemoveStatus)
          Deprecated. Fetch the string from the output stream and remove the HTTP header.
protected  boolean doAuthentication()
          Deprecated.  
 void dumpMsg(java.lang.String msg)
          Deprecated. Send a String message to stdout or a log file if one was selected via setLog.
 FTValList findAllCookies()
          Deprecated. Find the cookies in the post response
static FTValList findAllCookies(java.lang.String sData)
          Deprecated. Find all cookie values in the HTTP response
static COM.FutureTense.Util.CookieWrapper[] getCookieArray(java.lang.String sData)
          Deprecated. Find all cookie values in the HTTP response
 FTValList getCookies()
          Deprecated. Return FTValList containing all cookie names/values
 int getHTTPStatusCode()
          Deprecated. Fetch the HTTP status from the response
 java.lang.String getHTTPStatusText()
          Deprecated. Fetch the HTTP status text from the response
 int getLastError()
          Deprecated. Retrieve the last error code set
 java.lang.String getLastErrorStr()
          Deprecated. Retrieve any coded message from the status code object
 java.lang.String getLastErrorText()
          Deprecated. Retrieve the text represenation of the error returned by getLastError()
 java.lang.String getOutputFileSpec()
          Deprecated. Fetch the file spec where the post output has been written
 byte[] getRawResponse()
          Deprecated. Fetch the raw bytes from the output stream
 java.lang.String getResponse()
          Deprecated. Returns String response from the server after we post() our request.
 java.lang.String getResponseEncoding()
          Deprecated. Method to get the character encoding of the response if known
 javax.servlet.http.Cookie[] getServletCookies()
          Deprecated. Get HTTPServlet cookies
protected  java.lang.String getStatusRecordToken(int nCount)
          Deprecated.  
 java.lang.String getX_CSRF_TOKEN_VALUE()
          Deprecated.  
protected  void init()
          Deprecated.  
 void login(boolean login, COM.FutureTense.Util.ftStatusCode status, java.lang.String user, java.lang.String pass)
          Deprecated. Login or logout Set the url first in the FormPoster otherwise it will attempt to default to a NAS 2.1 style URL
 boolean post()
          Deprecated. Send this record via an HTTP POST.
protected  FTValList postProcessMIMEHeader(java.lang.String sHeader)
          Deprecated. Called to post-process a mime header once the postconnector reads it
protected static void processCookie(int nIndex, java.lang.String sData, java.util.Vector vCookies)
          Deprecated.  
protected  byte[] readStream(java.io.InputStream is)
          Deprecated.  
 void registerMIMENotifier(COM.FutureTense.Interfaces.IMIMENotifier mn)
          Deprecated. Register an object that supports the IMIMENotifier interface so that it will be called with MIME header information.
 void reset()
          Deprecated. Reset to reuse for a new post
protected static java.lang.String sanitizeString(java.lang.String sIn)
          Deprecated. Clean a string by only returning a printable substring
 void setAction(java.lang.String sAction)
          Deprecated. Sets the action for this request.
 void setAutenticationParameters(java.lang.String sEntity, java.lang.String sIssuer)
          Deprecated. Set the certificate parameters to be used to authenticate the server.
 void setBodyData(byte[] data)
          Deprecated. Pass a prebuilt MIME body for posting
 void setBodyStream(java.lang.Object is, int length)
          Deprecated. Pass a prebuilt MIME body for posting
 void setCharacterEncoding(java.lang.String sEncoding)
          Deprecated. Set the character encoding for the string data contained in the MIME request message body Ignored when the transmission method is Get
 void setCookies(javax.servlet.http.Cookie[] c)
          Deprecated. Use these cookies in the future
 void setCookies(java.util.Map cookiesMap)
          Deprecated. Use these cookies in the future
 void setDump(boolean dumpOutput)
          Deprecated. Control status logging info; default is false
 boolean setEncodeURL(java.lang.String sURL)
          Deprecated. Set the URL to post to.
 void setHeaderInformation(FTValList vlHeaderInfo)
          Deprecated. Use the header information supplied
 void setHTTPVersion(int nVersion)
          Deprecated. Set the HTTP protocol version to use.
 void setLog(COM.FutureTense.Util.LogFile logFile)
          Deprecated. Supply a logging object if desired for special log types; not required, output will stream to default location based on invocation environment
 void setLog(java.lang.String logdir)
          Deprecated. Provide a standard ascii file dump location for logging in absense of LogFile object
 void setOutputDirectory(java.lang.String sDir)
          Deprecated. Set the directory where the post results output file should be written.
 void setOutputStream(java.io.OutputStream os)
          Deprecated. Set an output stream to be used for capturing the response.
 void setPort(int nPort)
          Deprecated. Set the port to be used to connect to the remote http server
 void setProxy(java.lang.String sHost)
          Deprecated. Set the proxy host if needed to post thru a fire wall
 void setProxyPassword(java.lang.String p)
          Deprecated. Specify a proxy server password if needed to push data thru a firewall
 void setProxyPort(int nPort)
          Deprecated. Specify a proxy server port if needed to push data thru a firewall
 void setProxyUser(java.lang.String u)
          Deprecated. Specify a proxy server user if needed to push data thru a firewall
 void setSecureProtocol(boolean bSecure)
          Deprecated. Communicate in secure (https) mode.
 void setTimeout(int milliseconds)
          Deprecated. Set a network socket connection timeout, in milliseconds.
 boolean setURL(java.lang.String sURL)
          Deprecated. Set the URL to post to.
 void setX_CSRF_TOKEN_VALUE(java.lang.String xCSRFTOKENVALUE)
          Deprecated.  

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

ERRORSUCCESS

public static final int ERRORSUCCESS
Deprecated. 
Error success
See Also:
Constant Field Values

ERRORNOCONSERVER

public static final int ERRORNOCONSERVER
Deprecated. 
Error can't connect to server
See Also:
Constant Field Values

ERRORNETDISCONNECT

public static final int ERRORNETDISCONNECT
Deprecated. 
Error network disconnected
See Also:
Constant Field Values

ERRORNOURLPARAM

public static final int ERRORNOURLPARAM
Deprecated. 
Error bad URL input params
See Also:
Constant Field Values

ERRORTIMEOUT

public static final int ERRORTIMEOUT
Deprecated. 
Error network timeout forced
See Also:
Constant Field Values

ERRORBADRESPONSE

public static final int ERRORBADRESPONSE
Deprecated. 
Error server response did not contain handshake code
See Also:
Constant Field Values

ERRORNOTAUTHENTICATED

public static final int ERRORNOTAUTHENTICATED
Deprecated. 
Server certificate does not match what is expected
See Also:
Constant Field Values

ERROROUTOFMEMORY

public static final int ERROROUTOFMEMORY
Deprecated. 
Error - out of memory reading a server response
See Also:
Constant Field Values

ERRORGENERAL

public static final int ERRORGENERAL
Deprecated. 
General error
See Also:
Constant Field Values

ERRORFILEIO

public static final int ERRORFILEIO
Deprecated. 
File I/O error
See Also:
Constant Field Values

ERRORILLEGALDATAFORACTION

public static final int ERRORILLEGALDATAFORACTION
Deprecated. 
File data used with Get Method error
See Also:
Constant Field Values

HTTPVERSION10

public static final int HTTPVERSION10
Deprecated. 
HTTP 1.0 flag
See Also:
Constant Field Values

HTTPVERSION11

public static final int HTTPVERSION11
Deprecated. 
HTTP 1.1 flag
See Also:
Constant Field Values

Post

public static final java.lang.String Post
Deprecated. 
POST action
See Also:
Constant Field Values

Get

public static final java.lang.String Get
Deprecated. 
GET action
See Also:
Constant Field Values

Connect

public static final java.lang.String Connect
Deprecated. 
CONNECT action
See Also:
Constant Field Values

Delete

public static final java.lang.String Delete
Deprecated. 
DELETE action
See Also:
Constant Field Values

Head

public static final java.lang.String Head
Deprecated. 
HEAD action
See Also:
Constant Field Values

Options

public static final java.lang.String Options
Deprecated. 
PUT action
See Also:
Constant Field Values

Put

public static final java.lang.String Put
Deprecated. 
PUT action
See Also:
Constant Field Values

Trace

public static final java.lang.String Trace
Deprecated. 
TRACE action
See Also:
Constant Field Values

HTTPRESPONSEOK

public static final int HTTPRESPONSEOK
Deprecated. 
HTTP Success
See Also:
Constant Field Values

HTTPRESPONSENOTOK

public static final int HTTPRESPONSENOTOK
Deprecated. 
HTTP Errors... and up
See Also:
Constant Field Values

HTTPRESPONSENOPAGEFOUND

public static final int HTTPRESPONSENOPAGEFOUND
Deprecated. 
See Also:
Constant Field Values

HTTPRESPONSETIMEOUT

public static final int HTTPRESPONSETIMEOUT
Deprecated. 
See Also:
Constant Field Values

HTTPRESPONSENOSERVICE

public static final int HTTPRESPONSENOSERVICE
Deprecated. 
See Also:
Constant Field Values

HTTP_ACCEPT_LANGUAGE

public static final java.lang.String HTTP_ACCEPT_LANGUAGE
Deprecated. 
See Also:
Constant Field Values

HTTP_REFERER

public static final java.lang.String HTTP_REFERER
Deprecated. 
See Also:
Constant Field Values

REMOTE_HOST

public static final java.lang.String REMOTE_HOST
Deprecated. 
See Also:
Constant Field Values

REMOTE_ADDR

public static final java.lang.String REMOTE_ADDR
Deprecated. 
See Also:
Constant Field Values

HTTP_CONNECTION

public static final java.lang.String HTTP_CONNECTION
Deprecated. 
See Also:
Constant Field Values

PATH_INFO

public static final java.lang.String PATH_INFO
Deprecated. 
See Also:
Constant Field Values

HTTP_USER_AGENT

public static final java.lang.String HTTP_USER_AGENT
Deprecated. 
See Also:
Constant Field Values

HTTP_ACCEPT_MIME_TYPES

public static final java.lang.String HTTP_ACCEPT_MIME_TYPES
Deprecated. 
See Also:
Constant Field Values

HTTP_ACCEPT_CHARSET

public static final java.lang.String HTTP_ACCEPT_CHARSET
Deprecated. 
See Also:
Constant Field Values

X_CSRF_TOKEN

public static final java.lang.String X_CSRF_TOKEN
Deprecated. 
See Also:
Constant Field Values

HTTP_SET_COOKIE

public static final java.lang.String HTTP_SET_COOKIE
Deprecated. 
See Also:
Constant Field Values

HTTP_CONTENT_TYPE_CHARSET

public static final java.lang.String HTTP_CONTENT_TYPE_CHARSET
Deprecated. 
See Also:
Constant Field Values

HTTP_CONTENT_TYPE

public static final java.lang.String HTTP_CONTENT_TYPE
Deprecated. 
See Also:
Constant Field Values

HTTP_CONTENT_LENGTH

public static final java.lang.String HTTP_CONTENT_LENGTH
Deprecated. 
See Also:
Constant Field Values

HTTP_EXPIRES

public static final java.lang.String HTTP_EXPIRES
Deprecated. 
See Also:
Constant Field Values

HTTP_LAST_MODIFIED

public static final java.lang.String HTTP_LAST_MODIFIED
Deprecated. 
See Also:
Constant Field Values

HTTP_POST_FORMMULTIPART

public static final java.lang.String HTTP_POST_FORMMULTIPART
Deprecated. 
See Also:
Constant Field Values

HTTP_POST_FORMURLENCODED

public static final java.lang.String HTTP_POST_FORMURLENCODED
Deprecated. 
See Also:
Constant Field Values

m_nLastError

protected int m_nLastError
Deprecated. 

m_byUserBodyData

protected byte[] m_byUserBodyData
Deprecated. 

m_byUserBodyStream

protected java.lang.Object m_byUserBodyStream
Deprecated. 

m_byUserContentLength

protected int m_byUserContentLength
Deprecated. 

m_Cookies

protected COM.FutureTense.Util.CookieWrapper[] m_Cookies
Deprecated. 

m_vlHeaderInfo

protected FTValList m_vlHeaderInfo
Deprecated. 

m_sbUserTextParams

protected java.lang.StringBuffer m_sbUserTextParams
Deprecated. 

m_bFileDataAdded

protected boolean m_bFileDataAdded
Deprecated. 

Constructor Detail

FormPoster

public FormPoster()
Deprecated. 
Construct a new object for post

FormPoster

public FormPoster(boolean panicOnProblem)
Deprecated. 

Method Detail

init

protected void init()
Deprecated. 

getServletCookies

public javax.servlet.http.Cookie[] getServletCookies()
Deprecated. 
Get HTTPServlet cookies

getCookies

public FTValList getCookies()
Deprecated. 
Return FTValList containing all cookie names/values
Returns:
FTValList - FTValList containing cookie names/values

setCookies

public void setCookies(javax.servlet.http.Cookie[] c)
Deprecated. 
Use these cookies in the future
Parameters:
c - cookie array, null to clear

setCookies

public void setCookies(java.util.Map cookiesMap)
Deprecated. 
Use these cookies in the future
Parameters:
cookiesMap - - Map containing cookie name/value pairs

setHeaderInformation

public void setHeaderInformation(FTValList vlHeaderInfo)
Deprecated. 
Use the header information supplied
Parameters:
vlHeaderInfo - - vallist containing header information

setBodyData

public void setBodyData(byte[] data)
Deprecated. 
Pass a prebuilt MIME body for posting
Parameters:
data -

setBodyStream

public void setBodyStream(java.lang.Object is,
                          int length)
Deprecated. 
Pass a prebuilt MIME body for posting
Parameters:
is - mime body
length - length of body

reset

public void reset()
Deprecated. 
Reset to reuse for a new post

login

public void login(boolean login,
                  COM.FutureTense.Util.ftStatusCode status,
                  java.lang.String user,
                  java.lang.String pass)
Deprecated. 
Login or logout Set the url first in the FormPoster otherwise it will attempt to default to a NAS 2.1 style URL
Parameters:
login - - TRUE login otherwise logout
status - - optional if specified return status will be set
user - - username to use to log in
pass - - password to use to log in

setDump

public void setDump(boolean dumpOutput)
Deprecated. 
Control status logging info; default is false
Parameters:
dumpOutput - whether to dump output msgs

setOutputDirectory

public void setOutputDirectory(java.lang.String sDir)
Deprecated. 
Set the directory where the post results output file should be written. Mutually exclusive with setOutputStream.
Parameters:
sDir - - directory path. If null, no output file written

setOutputStream

public void setOutputStream(java.io.OutputStream os)
Deprecated. 
Set an output stream to be used for capturing the response. Mutually exclusive with setOutputDirectory.
Parameters:
os - output stream (not closed)

setCharacterEncoding

public void setCharacterEncoding(java.lang.String sEncoding)
Deprecated. 
Set the character encoding for the string data contained in the MIME request message body Ignored when the transmission method is Get
Parameters:
sEncoding - character encoding

getOutputFileSpec

public java.lang.String getOutputFileSpec()
Deprecated. 
Fetch the file spec where the post output has been written
Returns:
String

getResponse

public java.lang.String getResponse()
Deprecated. 
Returns String response from the server after we post() our request.
Returns:
String response

getRawResponse

public byte[] getRawResponse()
Deprecated. 
Fetch the raw bytes from the output stream
Returns:
byte[] response

getResponseEncoding

public final java.lang.String getResponseEncoding()
Deprecated. 
Method to get the character encoding of the response if known
Returns:
character encoding or null if not text or unknown
Since:
6.0

cleanRawResponse

public byte[] cleanRawResponse(boolean bRemoveStatus)
Deprecated. 
Fetch the raw bytes from the output stream and remove the HTTP header. Optionally remove the trailing status code.
Parameters:
bRemoveStatus - boolean flag
Returns:
byte[] response

cleanRawResponse

public byte[] cleanRawResponse()
Deprecated. 
Fetch the raw bytes from the output stream and remove the HTTP header.
Returns:
byte[] response

getLastError

public int getLastError()
Deprecated. 
Retrieve the last error code set
Returns:
int error code

getLastErrorText

public java.lang.String getLastErrorText()
Deprecated. 
Retrieve the text represenation of the error returned by getLastError()
Returns:
String

getLastErrorStr

public java.lang.String getLastErrorStr()
Deprecated. 
Retrieve any coded message from the status code object
Returns:
String

getStatusRecordToken

protected java.lang.String getStatusRecordToken(int nCount)
Deprecated. 

getHTTPStatusCode

public int getHTTPStatusCode()
Deprecated. 
Fetch the HTTP status from the response
Returns:
int

getHTTPStatusText

public java.lang.String getHTTPStatusText()
Deprecated. 
Fetch the HTTP status text from the response
Returns:
String

setLog

public void setLog(COM.FutureTense.Util.LogFile logFile)
Deprecated. 
Supply a logging object if desired for special log types; not required, output will stream to default location based on invocation environment
Parameters:
logFile - an object which can construct a logging output

setLog

public void setLog(java.lang.String logdir)
Deprecated. 
Provide a standard ascii file dump location for logging in absense of LogFile object
Parameters:
logdir - path to log directory and 'wwwresponse.log' will be appended to create a logfile

setAction

public void setAction(java.lang.String sAction)
               throws java.lang.Exception
Deprecated. 
Sets the action for this request. Either FormPoster.Get or FormPoster.Post
Parameters:
sAction - action
Throws:
java.lang.Exception - if invalid action

readStream

protected byte[] readStream(java.io.InputStream is)
                     throws java.io.IOException
Deprecated. 
Throws:
java.io.IOException

addURL

public boolean addURL(java.lang.String sParamName,
                      java.lang.String sURL)
Deprecated. 
Add a url ("http://" or "https://") to data for multipart post, as in INPUT TYPE=FILE
Parameters:
sParamName - - the parameter name
sURL - - URL to fetch
Returns:
boolean

addFileData

public boolean addFileData(java.lang.String sParamName,
                           java.lang.String sFileName,
                           byte[] byData)
Deprecated. 
Add file (upload) data via a byte array for multipart post, as in INPUT TYPE=FILE
Parameters:
sParamName - - the parameter name
sFileName - - desired name of the file on the target (ie foo.txt)
byData - byte array containing file data
Returns:
boolean

addFileData

public boolean addFileData(java.lang.String sParamName,
                           java.lang.String sFileName,
                           byte[] byData,
                           java.lang.String sMIMEType)
Deprecated. 
Add file (upload) data via a byte array for multipart post, as in INPUT TYPE=FILE
Parameters:
sParamName - - the parameter name
sFileName - - desired name of the file on the target (ie foo.txt)
byData - byte array containing file data
sMIMEType - MIME type of the data
Returns:
boolean

addFileData

public boolean addFileData(java.lang.String sParamName,
                           java.lang.String sFileName,
                           java.io.InputStream is,
                           java.lang.String sMIMEType)
Deprecated. 
Add file (upload) data via a InputStream object for multipart post, as in INPUT TYPE=FILE
Parameters:
sParamName - - the parameter name
sFileName - - desired name of the file on the target (ie foo.txt)
is - - the object from where the file data will be read
sMIMEType - MIME type of the data
Returns:
boolean

addFileData

public boolean addFileData(java.lang.String sParamName,
                           java.lang.String sFileName,
                           java.io.InputStream is)
Deprecated. 
Add file (upload) data via a InputStream object for multipart post, as in INPUT TYPE=FILE
Parameters:
sParamName - - the parameter name
sFileName - - desired name of the file on the target (ie foo.txt)
is - - the object from where the file data will be read
Returns:
boolean

addFile

public boolean addFile(java.lang.String sParamName,
                       java.lang.String sValue,
                       java.lang.String sFileName)
Deprecated. 
Add a file (upload file path spec) to data for multipart post, as in INPUT TYPE=FILE
Parameters:
sParamName - - the parameter name
sValue - - value of the parameter (usually the file name)
sFileName - - name of the file to add
Returns:
boolean

addFile

public boolean addFile(java.lang.String sParamName,
                       java.lang.String sValue,
                       java.lang.String sFileName,
                       java.lang.String sMIMEType)
Deprecated. 
Add a file (upload file path spec) to data for multipart post, as in INPUT TYPE=FILE Allow specifing of mime type string.
Parameters:
sParamName - - the parameter name
sValue - - value of the parameter (usually the file name)
sFileName - - name of the file to add
sMIMEType - - MIME type string
Returns:
boolean

addTextValue

public boolean addTextValue(java.lang.String sParamName,
                            java.lang.String sValue)
Deprecated. 
Adds a name/value pair to the MIME message we're assembling.
Parameters:
sParamName - - name of the parameter
sValue - - value string of the parameter
Returns:
boolean status

setEncodeURL

public boolean setEncodeURL(java.lang.String sURL)
Deprecated. 
Set the URL to post to.
Returns:
true if URL is legal, false otherwise. (URL exceptions are captured and just return false)

setURL

public boolean setURL(java.lang.String sURL)
Deprecated. 
Set the URL to post to.
Returns:
true if URL is legal, false otherwise. (URL exceptions are captured and just return false)

setProxy

public void setProxy(java.lang.String sHost)
Deprecated. 
Set the proxy host if needed to post thru a fire wall
Parameters:
sHost - host

setProxyPort

public void setProxyPort(int nPort)
Deprecated. 
Specify a proxy server port if needed to push data thru a firewall
Parameters:
nPort - port

setProxyUser

public void setProxyUser(java.lang.String u)
Deprecated. 
Specify a proxy server user if needed to push data thru a firewall
Parameters:
u - username

setProxyPassword

public void setProxyPassword(java.lang.String p)
Deprecated. 
Specify a proxy server password if needed to push data thru a firewall
Parameters:
p - password

setTimeout

public void setTimeout(int milliseconds)
Deprecated. 
Set a network socket connection timeout, in milliseconds. Specify 0 for no timeout.
Parameters:
milliseconds - timeout in milliseconds

setSecureProtocol

public void setSecureProtocol(boolean bSecure)
Deprecated. 
Communicate in secure (https) mode.
Parameters:
bSecure - If set after URL is set, will override the default which was determined from the URL protocol

setPort

public void setPort(int nPort)
Deprecated. 
Set the port to be used to connect to the remote http server
Parameters:
nPort - port. If set after URL is set, will override the default which was determined from the URL protocol

setHTTPVersion

public void setHTTPVersion(int nVersion)
                    throws java.lang.Exception
Deprecated. 
Set the HTTP protocol version to use.
Parameters:
nVersion - protocol. Input should be one of:

FormPoster.HTTPVERSION10 or FormPoster.HTTPVERSION11

Throws:
java.lang.Exception - if invalid http version

post

public boolean post()
Deprecated. 
Send this record via an HTTP POST.
Returns:
boolean

doAuthentication

protected boolean doAuthentication()
Deprecated. 

dumpMsg

public void dumpMsg(java.lang.String msg)
Deprecated. 
Send a String message to stdout or a log file if one was selected via setLog.
Parameters:
msg - - the message to display

sanitizeString

protected static java.lang.String sanitizeString(java.lang.String sIn)
Deprecated. 
Clean a string by only returning a printable substring
Parameters:
sIn - - the string to be cleaned
Returns:
String - the sanitized string

addCookieToVector

protected static void addCookieToVector(java.util.Vector vCookies,
                                        java.lang.String sName,
                                        java.lang.String sValue)
Deprecated. 

processCookie

protected static void processCookie(int nIndex,
                                    java.lang.String sData,
                                    java.util.Vector vCookies)
Deprecated. 

buildCookieArray

protected void buildCookieArray()
Deprecated. 

findAllCookies

public FTValList findAllCookies()
Deprecated. 
Find the cookies in the post response

getCookieArray

public static COM.FutureTense.Util.CookieWrapper[] getCookieArray(java.lang.String sData)
Deprecated. 
Find all cookie values in the HTTP response
Parameters:
sData - data - HTTP response string
Returns:
Cookie[] - array of cookie objects

findAllCookies

public static FTValList findAllCookies(java.lang.String sData)
Deprecated. 
Find all cookie values in the HTTP response
Parameters:
sData - data - HTTP response string
Returns:
FTValList - FTValList object containing all cookie names and values

cleanResponse

public java.lang.String cleanResponse(boolean bRemoveStatus)
Deprecated. 
Fetch the string from the output stream and remove the HTTP header. Optionally remove the trailing status code.
Parameters:
bRemoveStatus - - TRUE remove status, FALSE otherwise
Returns:
String response

cleanResponse

public java.lang.String cleanResponse()
Deprecated. 
Fetch the string from the output stream and remove the HTTP header.
Returns:
String response

setAutenticationParameters

public void setAutenticationParameters(java.lang.String sEntity,
                                       java.lang.String sIssuer)
Deprecated. 
Set the certificate parameters to be used to authenticate the server. Will NOT be used if the protocol is not required to be secured.
Parameters:
sEntity - String expected name of the entity
sIssuer - String expected certificate issuer name (ie verisign)

postProcessMIMEHeader

protected FTValList postProcessMIMEHeader(java.lang.String sHeader)
Deprecated. 
Called to post-process a mime header once the postconnector reads it
Parameters:
sHeader - String MIME header

registerMIMENotifier

public void registerMIMENotifier(COM.FutureTense.Interfaces.IMIMENotifier mn)
Deprecated. 
Register an object that supports the IMIMENotifier interface so that it will be called with MIME header information. This method is only applicable when the post output is written to a disk or output stream.
Parameters:
mn - IMIMENotifer object which supports IMIMENotifier

getX_CSRF_TOKEN_VALUE

public java.lang.String getX_CSRF_TOKEN_VALUE()
Deprecated. 

setX_CSRF_TOKEN_VALUE

public void setX_CSRF_TOKEN_VALUE(java.lang.String xCSRFTOKENVALUE)
Deprecated. 

Skip navigation links


Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.