Overview | Package | Class | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.exist.storage
Class Signatures

    java.lang.Object
      org.exist.storage.Signatures

public final class Signatures
extends java.lang.Object

Static methods to deal with the signature of a node stored in the first byte of the node data in the persistent dom. The bits in the signature are used as follows:

      8 4 2 1 8 4 2 1
      T T T N 0 0 I I

where T = node type, N = has-namespace flag, I = no of bytes used to store the name of the node (local name for elements and attributes).

Field Summary
`static int` | `Attr`
`static int` | `ByteContent`
`static int` | `Cdata`
`static int` | `Char`
`static int` | `Comm`
`static int` | `Elem`
`static int` | `IntContent`
`static int` | `NoContent`
`static int` | `Proc`
`static int` | `ShortContent`

Constructor Summary
`Signatures()`

Method Summary
`static int` | `getLength(int type)` Returns the storage size of the given type as number of bytes required.
`static byte` | `getSizeType(int length)` Returns one of IntContent, ShortContent, ByteContent or NoContent based on the number of bytes required to store the integer value given in length.
`static short` | `getType(byte signature)` From the signature in byte 0 of the node data, extract the node type and return a constant as defined in `Node`.
`static int` | `read(int type, byte[] data, int pos)`
`static void` | `write(int type, int size, byte[] data, int pos)`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### Char

    public static final int Char

See Also:
  Constant Field Values

### Elem

    public static final int Elem

See Also:
  Constant Field Values

### Proc

    public static final int Proc

See Also:
  Constant Field Values

### Comm

    public static final int Comm

See Also:
  Constant Field Values

### Attr

    public static final int Attr

See Also:
  Constant Field Values

### Cdata

    public static final int Cdata

See Also:
  Constant Field Values

### IntContent

    public static final int IntContent

See Also:
  Constant Field Values

### ByteContent

    public static final int ByteContent

See Also:
  Constant Field Values

### NoContent

    public static final int NoContent

See Also:
  Constant Field Values

### ShortContent

    public static final int ShortContent

See Also:
  Constant Field Values

Constructor Detail

### Signatures

    public Signatures()

Method Detail

### getLength

    public static final int getLength(int type)

  Returns the storage size of the given type as number of bytes required.

### getSizeType

    public static final byte getSizeType(int length)

  Returns one of IntContent, ShortContent, ByteContent or NoContent based on the number of bytes required to store the integer value given in length.

### getType

    public static final short getType(byte signature)

  From the signature in byte 0 of the node data, extract the node type and return a constant as defined in `Node`.

### read

    public static final int read(int type,
                                 byte[] data,
                                 int pos)

### write

    public static final void write(int type,
                                   int size,
                                   byte[] data,
                                   int pos)

Overview | Package | Class | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (C) Wolfgang Meier. All rights reserved.