Package org.apache.directory.mavibot.btree.exception

Examples of org.apache.directory.mavibot.btree.exception.SerializerCreationException


     */
    public static byte[] deserialize( byte[] in )
    {
        if ( ( in == null ) || ( in.length < 4 ) )
        {
            throw new SerializerCreationException( "Cannot extract a byte[] from a buffer with not enough bytes" );
        }

        int len = IntSerializer.deserialize( in );

        switch ( len )
View Full Code Here


     */
    public static byte[] deserialize( byte[] in, int start )
    {
        if ( ( in == null ) || ( in.length < 4 + start ) )
        {
            throw new SerializerCreationException( "Cannot extract a byte[] from a buffer with not enough bytes" );
        }

        int len = IntSerializer.deserialize( in, start );

        switch ( len )
View Full Code Here

     */
    public byte[] fromBytes( byte[] in )
    {
        if ( ( in == null ) || ( in.length < 4 ) )
        {
            throw new SerializerCreationException( "Cannot extract a byte[] from a buffer with not enough bytes" );
        }

        int len = IntSerializer.deserialize( in );

        switch ( len )
View Full Code Here

     */
    public byte[] fromBytes( byte[] in, int start )
    {
        if ( ( in == null ) || ( in.length < 4 + start ) )
        {
            throw new SerializerCreationException( "Cannot extract a byte[] from a buffer with not enough bytes" );
        }

        int len = IntSerializer.deserialize( in, start );

        switch ( len )
View Full Code Here

     */
    public static Short deserialize( byte[] in, int start )
    {
        if ( ( in == null ) || ( in.length < 2 + start ) )
        {
            throw new SerializerCreationException( "Cannot extract a Short from a buffer with not enough bytes" );
        }

        return ( short ) ( ( in[start] << 8 ) + ( in[start + 1] & 0xFF ) );
    }
View Full Code Here

     */
    public Short fromBytes( byte[] in, int start )
    {
        if ( ( in == null ) || ( in.length < 2 + start ) )
        {
            throw new SerializerCreationException( "Cannot extract a Short from a buffer with not enough bytes" );
        }

        return ( short ) ( ( in[start] << 8 ) + ( in[start + 1] & 0xFF ) );
    }
View Full Code Here

     */
    public static Integer deserialize( byte[] in, int start )
    {
        if ( ( in == null ) || ( in.length < 4 + start ) )
        {
            throw new SerializerCreationException( "Cannot extract a Integer from a buffer with not enough bytes" );
        }

        return ( in[start] << 24 ) +
            ( ( in[start + 1] & 0xFF ) << 16 ) +
            ( ( in[start + 2] & 0xFF ) << 8 ) +
View Full Code Here

     */
    public Integer fromBytes( byte[] in, int start )
    {
        if ( ( in == null ) || ( in.length < 4 + start ) )
        {
            throw new SerializerCreationException( "Cannot extract a Integer from a buffer with not enough bytes" );
        }

        return ( in[start] << 24 ) +
            ( ( in[start + 1] & 0xFF ) << 16 ) +
            ( ( in[start + 2] & 0xFF ) << 8 ) +
View Full Code Here

    /* no qualifier*/static RevisionName deserialize( byte[] in, int start )
    {
        // The buffer must be 8 bytes plus 4 bytes long (the revision is a long, and the name is a String
        if ( ( in == null ) || ( in.length < 12 + start ) )
        {
            throw new SerializerCreationException( "Cannot extract a RevisionName from a buffer with not enough bytes" );
        }

        long revision = LongSerializer.deserialize( in, start );
        String name = StringSerializer.deserialize( in, 8 + start );

View Full Code Here

    public RevisionName fromBytes( byte[] in, int start )
    {
        // The buffer must be 8 bytes plus 4 bytes long (the revision is a long, and the name is a String
        if ( ( in == null ) || ( in.length < 12 + start ) )
        {
            throw new SerializerCreationException( "Cannot extract a RevisionName from a buffer with not enough bytes" );
        }

        long revision = LongSerializer.deserialize( in, start );
        String name = StringSerializer.deserialize( in, 8 + start );
View Full Code Here

TOP

Related Classes of org.apache.directory.mavibot.btree.exception.SerializerCreationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.