public class FileAPIConnector extends Object implements IAPIConnector
Constructor and Description |
---|
FileAPIConnector(String fileName,
String prefix)
Create Connector
|
Modifier and Type | Method and Description |
---|---|
OutputStream |
beginRequest(String path,
String contentType)
Operation not supported
|
InputStream |
endRequest(String path)
Operation not supported
|
Reader |
getData()
Read data from the root of the connection
Note: Caller is responsible for closing the returned stream
|
Reader |
getData(String path)
Read data from the path provided
Note: Caller is responsible for closing the returned stream
|
String |
getLastData() |
String |
getLastPath() |
Reader |
sendData(String path,
String data)
Send data to the path
Note: Caller is responsible for closing the returned stream
|
public Reader getData() throws ConnectionException
IAPIConnector
getData
in interface IAPIConnector
ConnectionException
- if any connection problems occurpublic Reader getData(String path) throws ConnectionException
IAPIConnector
getData
in interface IAPIConnector
path
- StringConnectionException
- if any connection problems occurpublic Reader sendData(String path, String data) throws ConnectionException
IAPIConnector
sendData
in interface IAPIConnector
path
- - Stringdata
- - StringConnectionException
- if any connection problems occurpublic String getLastPath()
public String getLastData()
public OutputStream beginRequest(String path, String contentType)
beginRequest
in interface IAPIConnector
path
- path to the data on servercontentType
- Content-type of HTTP headerpublic InputStream endRequest(String path)
endRequest
in interface IAPIConnector
path
- path to the data on serverCopyright © 2015 VersionOne, Inc.. All rights reserved.