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

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


            return null;
        }

        if ( in.length < length + 4 + start )
        {
            throw new SerializerCreationException( "Cannot extract a String from a buffer with not enough bytes" );
        }

        return Strings.utf8ToString( in, start + 4, length );
    }
View Full Code Here


            return null;
        }

        if ( in.length < length + start )
        {
            throw new SerializerCreationException( "Cannot extract a String from a buffer with not enough bytes" );
        }

        return Strings.utf8ToString( in, start + 4, length );
    }
View Full Code Here

                    buffer[start + 3] = ( byte ) ( strBytes.length );
                }
                catch ( UnsupportedEncodingException uee )
                {
                    // if this happens something is really strange
                    throw new SerializerCreationException( uee );
                }
        }

        return buffer;
    }
View Full Code Here

    /* no qualifier*/static NameRevision 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 NameRevision 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 NameRevision 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 NameRevision from a buffer with not enough bytes" );
        }

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

    @Override
    public byte[] serialize( NameRevision revisionName )
    {
        if ( revisionName == null )
        {
            throw new SerializerCreationException( "The revisionName instance should not be null " );
        }

        byte[] result = null;

        if ( revisionName.getName() != null )
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.