Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Firebird Open Source J2ee connector - jdbc driver
  *
  * Distributable under LGPL license.
  * You may obtain a copy of the License at http://www.gnu.org/copyleft/lgpl.html
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * LGPL License for more details.
 *
 * This file was created by members of the firebird development team.
 * All individual contributions remain the Copyright (C) of those
 * individuals.  Contributors to this file are either listed here or
 * can be obtained from a CVS history command.
 *
 * All rights reserved.
 */
package org.firebirdsql.gds.impl.wire;
The interface Xdrable represents an object that can read and write itself from a strean in the xdr format used by the firebird engine.

Author(s):
David Jencks
Version:
1.0
public interface Xdrable {

    
Get the total length (in bytes) of this Xdrable when it is written to XDR format.

Returns:
The total length in bytes
    int getLength();

    
Read in Xdrable in XDR format, from an XdrInputStream.

Parameters:
in The input stream from which the object is to be read.
length The number of bytes to be read
Throws:
java.io.IOException if an error occurs while reading from the XdrInputStream
    void read(XdrInputStream inint lengththrows IOException;

    
Write the this Xdrable out in XDR format to an XdrOutputStream.

Parameters:
out The output stream to which the Xdrable is to be written
Throws:
java.io.IOException if an error occurs while writing to the XdrOutputStream
    void write(XdrOutputStream outthrows IOException;
New to GrepCode? Check out our FAQ X