Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| dbXML API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.dbxml.db.core.data
Class Value

    java.lang.Object
      com.dbxml.db.core.data.Value

All Implemented Interfaces:
  java.lang.Comparable

Direct Known Subclasses:
  IndexValue, Key

public class Value
extends java.lang.Object
implements java.lang.Comparable

Value is the primary base class for all data storing objects. The content window of Value objects are immutable, but the underlying byte array is not.

Constructor Summary
`Value(byte[] data)`
`Value(byte[] data, int pos, int len)`
`Value(java.lang.String data)`
`Value(java.lang.String data, boolean utf8)`
`Value(Value value)`

Method Summary
`int` | `compareTo(java.lang.Object obj)`
`int` | `compareTo(Value value)`
`void` | `copyTo(byte[] tdata, int tpos)`
`boolean` | `equals(java.lang.Object obj)`
`boolean` | `equals(Value value)`
`byte[]` | `getData()` getData retrieves the data being stored by the Value as a byte array.
`java.io.InputStream` | `getInputStream()` getInputStream returns an InputStream for the Value.
`int` | `getLength()` getLength retrieves the length of the data being stored by the Value.
`int` | `getOffset()` getOffset returns the offset into the data being stored by the Value that the value begins.
`byte[]` | `getRawData()` getRawData returns the byte array that this Value belongs to, which may ultimately be larger than the actual value.
`int` | `hashCode()`
`boolean` | `startsWith(Value value)`
`void` | `streamTo(java.io.OutputStream out)` streamTo streams the content of the Value to an OutputStream.
`java.lang.String` | `toString()`
`java.lang.String` | `toString(boolean utf8)`

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

Constructor Detail

### Value

    public Value(Value value)

### Value

    public Value(byte[] data)

### Value

    public Value(byte[] data,
                 int pos,
                 int len)

### Value

    public Value(java.lang.String data)

### Value

    public Value(java.lang.String data,
                 boolean utf8)

Method Detail

### getData

    public final byte[] getData()

  getData retrieves the data being stored by the Value as a byte array.

  Returns:
    The Data

### getRawData

    public final byte[] getRawData()

  getRawData returns the byte array that this Value belongs to, which may ultimately be larger than the actual value.

  Returns:
    The raw byte array

### getOffset

    public final int getOffset()

  getOffset returns the offset into the data being stored by the Value that the value begins.

  Returns:
    The Value offset

### getLength

    public final int getLength()

  getLength retrieves the length of the data being stored by the Value.

  Returns:
    The Value length

### getInputStream

    public final java.io.InputStream getInputStream()

  getInputStream returns an InputStream for the Value.

  Returns:
    An InputStream

### streamTo

    public final void streamTo(java.io.OutputStream out)
                        throws java.io.IOException

  streamTo streams the content of the Value to an OutputStream.

  Parameters:
    `out` - the OutputStream
  Throws:
    `java.io.IOException`

### copyTo

    public final void copyTo(byte[] tdata,
                             int tpos)

### toString

    public final java.lang.String toString(boolean utf8)

### toString

    public final java.lang.String toString()

### hashCode

    public int hashCode()

### equals

    public boolean equals(Value value)

### equals

    public boolean equals(java.lang.Object obj)

### compareTo

    public int compareTo(Value value)

### compareTo

    public final int compareTo(java.lang.Object obj)

  Specified by:
    `compareTo` in interface `java.lang.Comparable`

### startsWith

    public final boolean startsWith(Value value)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| dbXML API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2004 The dbXML Group