| Prev Class | Next Class | Frames | No Frames |
| Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Objectcom.sun.rpc.Xdrpublic class Xdrextends java.lang.ObjectRpcConstructor Summary | |
| |
Method Summary | |
boolean |
|
void |
|
byte[] |
|
byte[] |
|
void |
|
void |
|
void |
|
void | |
float |
|
void |
|
long |
|
void |
|
int |
|
void |
|
int |
|
void |
|
void |
|
void |
|
void |
|
byte[] |
|
byte[] |
|
int |
|
void |
|
void |
|
String |
|
void |
|
long |
|
void |
|
int |
|
void |
|
public Xdr(int size)
Build a new Xdr object with a buffer of given size
- Parameters:
size- of the buffer in bytes
public boolean xdr_bool()
Get a boolean from the buffer
- Returns:
- boolean
public void xdr_bool(boolean b)
Put a boolean into the buffer
- Parameters:
b- boolean
public byte[] xdr_buf()
Return the entire Xdr buffer
- Returns:
- Xdr buffer
public byte[] xdr_bytes()
Get a counted array of bytes from the buffer
- Returns:
- bytes
public void xdr_bytes(byte[] b)
Put a counted array of bytes into the buffer. Note that the entire byte array is encoded.
- Parameters:
b- byte array
public void xdr_bytes(byte[] b,
int len)Put a counted array of bytes into the buffer
- Parameters:
b- byte arraylen- number of bytes to encode
public void xdr_bytes(byte[] b,
int boff,
int len)Put a counted array of bytes into the buffer
- Parameters:
b- byte arrayboff- offset into byte arraylen- number of bytes to encode
public void xdr_bytes(Xdr x)
Put an Xdr buffer into the buffer
This is used to encode the RPC credentials
- Parameters:
x- XDR buffer
public float xdr_float()
Get a floating point number from the buffer
- Returns:
- float
public void xdr_float(float f)
Put a floating point number into the buffer
- Parameters:
f- float
public long xdr_hyper()
Get a long from the buffer
- Returns:
- long
public void xdr_hyper(long i)
Put a long into the buffer
- Parameters:
i- long to store in XDR buffer
public int xdr_int()
Get an integer from the buffer
- Returns:
- integer
public void xdr_int(int i)
Put an integer into the buffer
- Parameters:
i- Integer to store in XDR buffer.
public int xdr_offset()
Return the current offset
- Returns:
- offset
public void xdr_offset(int off)
Set the current offset
- Parameters:
off- offset into XDR buffer
public void xdr_raw(byte[] b)
Put a fixed number of bytes into the buffer The length is not encoded. e.g. an NFS v2 filehandle
- Parameters:
b- byte array
public void xdr_raw(byte[] b,
int off)Put a fixed number of bytes into the buffer at offset off. The length is not encoded.
- Parameters:
b- byte arrayoff- where to put the byte array
public void xdr_raw(byte[] b,
int boff,
int len)Put a counted array of bytes into the buffer. The length is not encoded.
- Parameters:
b- byte arrayboff- offset into byte arraylen- number of bytes to encode
public byte[] xdr_raw(int len)
Get a fixed number of bytes from the buffer e.g. an NFS v2 filehandle
- Parameters:
len- Number of bytes to get
- Returns:
- byte array
public byte[] xdr_raw(int off,
int len)Get a fixed number (len) of bytes from the buffer at offset off. Do not change any buffer indicators.
- Parameters:
off- Offset of bytes to get fromlen- Number of bytes to copy
- Returns:
- byte array
public int xdr_size()
Return the current size of the XDR buffer
- Returns:
- size
public void xdr_size(int size)
Set the current size of the XDR buffer
- Parameters:
size- of buffer
public void xdr_skip(int count)
Skip a number of bytes.
Note that the count is rounded up to the next XDRUNIT.
- Parameters:
count- of the buffer in bytes
public String xdr_string()
Get a string from the buffer
- Returns:
- string
public void xdr_string(String s)
Put a string into the buffer
- Parameters:
s- string
public long xdr_u_int()
Get an unsigned integer from the buffer
Note that Java has no unsigned integer type so we must return it as a long.
- Returns:
- long
public void xdr_u_int(long i)
Put an unsigned integer into the buffer Note that Java has no unsigned integer type so we must submit it as a long.
- Parameters:
i- unsigned integer to store in XDR buffer.
public int xdr_wrap_offset()
Return the starting point of the bytes that will be encrypted.
- Returns:
- offset for bytes to be encrypted
public void xdr_wrap_offset(int off)
Set the starting point of the bytes that will be encrypted.