issrg.utils.webdav
Class WebDAVSocketHTTP

java.lang.Object
  extended by issrg.utils.webdav.WebDAVSocketHTTP
All Implemented Interfaces:
WebDAVSocket

public class WebDAVSocketHTTP
extends java.lang.Object
implements WebDAVSocket

This class is the implementation of a Socket for use over a HTTP connection. It's methods are defined in the WebDAVSocket interface.

Version:
19/03/2007
Author:
Sean Antony

Constructor Summary
WebDAVSocketHTTP()
           
 
Method Summary
 void close()
          3.
 void open(java.lang.String server, int port)
          1.
 byte[] sendAndReceive(byte[] message)
          2.
 java.lang.String sendAndReceive(java.lang.String message)
          2.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebDAVSocketHTTP

public WebDAVSocketHTTP()
Method Detail

open

public void open(java.lang.String server,
                 int port)
          throws java.net.UnknownHostException,
                 java.io.IOException
Description copied from interface: WebDAVSocket
1. A HTTP client opens a connection.

Specified by:
open in interface WebDAVSocket
Throws:
java.io.IOException
java.net.UnknownHostException

sendAndReceive

public java.lang.String sendAndReceive(java.lang.String message)
                                throws java.io.IOException
Description copied from interface: WebDAVSocket
2. Sends a request message to a HTTP server and the server returns a response message, containing the requested data or an error.

Specified by:
sendAndReceive in interface WebDAVSocket
Parameters:
message - client request message
Returns:
server response message
Throws:
java.io.IOException

sendAndReceive

public byte[] sendAndReceive(byte[] message)
                      throws java.io.IOException
Description copied from interface: WebDAVSocket
2. Sends a request message to a HTTP server and the server returns a response message, containing the requested data or an error.

Specified by:
sendAndReceive in interface WebDAVSocket
Parameters:
message - client request message in binary
Returns:
server response message in binary
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Description copied from interface: WebDAVSocket
3. Closes the connection.

Specified by:
close in interface WebDAVSocket
Throws:
java.io.IOException