netbula.ORPC

Class XDTFile

Implemented Interfaces:
XDT

public class XDTFile
extends java.lang.Object
implements XDT

This class can be used to transfer a file in an RPC call. The file data is transfered through the XDR stream. See filexfer sample application for its usage

Constructor Summary

XDTFile()
XDTFile(String Filename)

Method Summary

XDT
Clone()
int
byteCount()
XDT[]
getArray(int len)
String
receivedFilepath()
Called by receiver only
String
savedFilename()
Called by receiver only
void
xdr(XDR xdrs)
Encoding/decoding the object itself through the XDR stream

Constructor Details

XDTFile

public XDTFile()

XDTFile

public XDTFile(String Filename)
Parameters:
Filename - the name of the file to be sent

Method Details

Clone

public XDT Clone()
Specified by:
Clone in interface XDT

byteCount

public int byteCount()
Returns:
Number of bytes transfered

getArray

public XDT[] getArray(int len)
Specified by:
getArray in interface XDT

receivedFilepath

public String receivedFilepath()
Called by receiver only
Returns:
the filename that has been received

savedFilename

public String savedFilename()
Called by receiver only
Returns:
the filename that has been saved to

xdr

public void xdr(XDR xdrs)
            throws XDRError
Encoding/decoding the object itself through the XDR stream
Specified by:
xdr in interface XDT
Parameters:
xdrs - the XDR stream