org.modeshape.jcr.value

## Interface BinaryValue

- All Superinterfaces:
    Binary, Comparable<BinaryValue>, Serializable
  All Known Implementing Classes:
    AbstractBinary, EmptyBinaryValue, ExternalBinaryValue, FileUrlBinaryValue, GitBinaryValue, InMemoryBinaryValue, StoredBinaryValue, UrlBinaryValue

      @Immutable
      public interface BinaryValue
      extends Comparable<BinaryValue>, Serializable, Binary

  Value holder for binary data. BinaryValue extends the public `Binary` interface (which itself extends `Binary`) and adds requirements such as being serializable and comparable.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `BinaryKey` | `getKey()` Get the key for the binary value.
    `long` | `getSize()` Get the length of this binary data.

    - ### Methods inherited from interface java.lang.Comparable

      `compareTo`

    - ### Methods inherited from interface org.modeshape.jcr.api.Binary

      `getHash, getHexHash, getMimeType, getMimeType`

    - ### Methods inherited from interface javax.jcr.Binary

      `dispose, getStream, read`

- - ### Method Detail

    - #### getSize

          long getSize()

      Get the length of this binary data.

      Note that this method, unlike the standard `Binary.getSize()` method, does not throw an exception.

      Specified by:
        `getSize` in interface `Binary`
      Returns:
        the number of bytes in this binary data

    - #### getKey

          BinaryKey getKey()

      Get the key for the binary value.
      Returns:
        the key; never null

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.