org.modeshape.jcr.value.binary

## Class UrlBinaryValue

- java.lang.Object
- - org.modeshape.jcr.value.binary.AbstractBinary
  - - org.modeshape.jcr.value.binary.ExternalBinaryValue
    - - org.modeshape.jcr.value.binary.UrlBinaryValue

- All Implemented Interfaces:
    Serializable, Comparable<BinaryValue>, Binary, BinaryValue
  Direct Known Subclasses:
    FileUrlBinaryValue

      public class UrlBinaryValue
      extends ExternalBinaryValue

  A `BinaryValue` implementation used to read the content of a resolvable URL. This class computes the `MIME type` lazily.
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class org.modeshape.jcr.value.binary.AbstractBinary

      `EMPTY_CONTENT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `UrlBinaryValue(String sha1, String sourceName, URL content, long size, String nameHint, MimeTypeDetector mimeTypeDetector)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `InputStream` | `getStream()`
    `protected URL` | `toUrl()`

    - ### Methods inherited from class org.modeshape.jcr.value.binary.ExternalBinaryValue

      `getId, getMimeType, getMimeType, getSize, getSourceName, hasMimeType, setMimeType, toString`

    - ### Methods inherited from class org.modeshape.jcr.value.binary.AbstractBinary

      `compareTo, dispose, equals, getHash, getHexHash, getKey, getReadableSize, hashCode, keyFor, read`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### UrlBinaryValue

          public UrlBinaryValue(String sha1,
                        String sourceName,
                        URL content,
                        long size,
                        String nameHint,
                        MimeTypeDetector mimeTypeDetector)

  - ### Method Detail

    - #### toUrl

          protected URL toUrl()

    - #### getStream

          public InputStream getStream()
                                throws RepositoryException

      Throws:
        `RepositoryException`

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