From d479253768d296a40b4f699e1de9b03c7146a97a Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Tue, 3 Dec 2013 14:03:28 -0800 Subject: Adding javadocs and Carbonado User Guide --- apidocs/com/amazon/carbonado/lob/Blob.html | 564 +++++++++++++++++++++++++++++ 1 file changed, 564 insertions(+) create mode 100644 apidocs/com/amazon/carbonado/lob/Blob.html (limited to 'apidocs/com/amazon/carbonado/lob/Blob.html') diff --git a/apidocs/com/amazon/carbonado/lob/Blob.html b/apidocs/com/amazon/carbonado/lob/Blob.html new file mode 100644 index 0000000..40d1dc6 --- /dev/null +++ b/apidocs/com/amazon/carbonado/lob/Blob.html @@ -0,0 +1,564 @@ + + + + + + +Blob (Carbonado 1.2.3 API) + + + + + + + +
+ + + + + +
+ + + +
+
com.amazon.carbonado.lob
+

Interface Blob

+
+
+
+
    +
  • +
    +
    All Superinterfaces:
    +
    Lob
    +
    +
    +
    All Known Implementing Classes:
    +
    AbstractBlob, ByteArrayBlob, FileBlob
    +
    +
    +
    +
    public interface Blob
    +extends Lob
    +
    Provides access to BLOBs, which are Binary Large OBjects. Consider accessing + Blobs within a transaction scope, + to prevent unexpected updates.
    +
    Author:
    +
    Brian S O'Neill
    +
    See Also:
    Clob
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Methods 
      Modifier and TypeMethod and Description
      java.lang.StringasString() +
      Convenience method to capture all the Blob data as a single String, + assuming UTF-8 encoding.
      +
      java.lang.StringasString(java.nio.charset.Charset charset) +
      Convenience method to capture all the Blob data as a single String, + decoded against the given charset.
      +
      java.lang.StringasString(java.lang.String charsetName) +
      Convenience method to capture all the Blob data as a single String, + decoded against the given charset.
      +
      longgetLength() +
      Returns the length of this Blob, in bytes.
      +
      java.io.InputStreamopenInputStream() +
      Returns an InputStream for reading Blob data positioned at the + start.
      +
      java.io.InputStreamopenInputStream(long pos) +
      Returns an InputStream for reading Blob data.
      +
      java.io.InputStreamopenInputStream(long pos, + int bufferSize) +
      Returns an InputStream for reading Blob data.
      +
      java.io.OutputStreamopenOutputStream() +
      Returns an OutputStream for writing Blob data, positioned at the + start.
      +
      java.io.OutputStreamopenOutputStream(long pos) +
      Returns an OutputStream for writing Blob data.
      +
      java.io.OutputStreamopenOutputStream(long pos, + int bufferSize) +
      Returns an OutputStream for writing Blob data.
      +
      voidsetLength(long length) +
      Set the length of this Blob, in bytes.
      +
      voidsetValue(java.lang.String value) +
      Convenience method to overwrite all Blob data with the value of a single + String, applying UTF-8 encoding.
      +
      voidsetValue(java.lang.String value, + java.nio.charset.Charset charset) +
      Convenience method to overwrite all Blob data with the value of a single + String, applying the given charset encoding.
      +
      voidsetValue(java.lang.String value, + java.lang.String charsetName) +
      Convenience method to overwrite all Blob data with the value of a single + String, applying the given charset encoding.
      +
      + +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        openInputStream

        +
        java.io.InputStream openInputStream()
        +                                    throws FetchException
        +
        Returns an InputStream for reading Blob data positioned at the + start. The Blob implementation selects an appropriate buffer size for + the stream.
        +
        Returns:
        InputStream for this Blob, which is not guaranteed to be thread-safe
        +
        Throws:
        +
        java.lang.IllegalArgumentException - if position is negative
        +
        FetchException
        +
      • +
      + + + +
        +
      • +

        openInputStream

        +
        java.io.InputStream openInputStream(long pos)
        +                                    throws FetchException
        +
        Returns an InputStream for reading Blob data. The Blob implementation + selects an appropriate buffer size for the stream.
        +
        Parameters:
        pos - desired zero-based position to read from
        +
        Returns:
        InputStream for this Blob, which is not guaranteed to be thread-safe
        +
        Throws:
        +
        java.lang.IllegalArgumentException - if position is negative
        +
        FetchException
        +
      • +
      + + + +
        +
      • +

        openInputStream

        +
        java.io.InputStream openInputStream(long pos,
        +                                  int bufferSize)
        +                                    throws FetchException
        +
        Returns an InputStream for reading Blob data. A suggested buffer size + must be provided, but it might be ignored by the Blob implementation.
        +
        Parameters:
        pos - desired zero-based position to read from
        bufferSize - suggest that the input stream buffer be at least this large (in bytes)
        +
        Returns:
        InputStream for this Blob, which is not guaranteed to be thread-safe
        +
        Throws:
        +
        java.lang.IllegalArgumentException - if position is negative
        +
        FetchException
        +
      • +
      + + + + + + + +
        +
      • +

        asString

        +
        java.lang.String asString()
        +                          throws FetchException
        +
        Convenience method to capture all the Blob data as a single String, + assuming UTF-8 encoding. Call within a transaction scope to ensure the + data does not change while the String is being built.
        +
        Throws:
        +
        java.lang.IllegalArgumentException - if resulting String length would be + greater than Integer.MAX_VALUE
        +
        java.lang.OutOfMemoryError - if not enough memory to hold Blob as a single String
        +
        FetchException
        +
      • +
      + + + +
        +
      • +

        asString

        +
        java.lang.String asString(java.lang.String charsetName)
        +                          throws FetchException
        +
        Convenience method to capture all the Blob data as a single String, + decoded against the given charset. Call within a transaction scope to + ensure the data does not change while the String is being built.
        +
        Parameters:
        charsetName - name of character set to decode String
        +
        Throws:
        +
        java.nio.charset.IllegalCharsetNameException - if the given charset name is illegal
        +
        java.lang.IllegalArgumentException - if resulting String length would be + greater than Integer.MAX_VALUE
        +
        java.lang.OutOfMemoryError - if not enough memory to hold Blob as a single String
        +
        FetchException
        +
      • +
      + + + +
        +
      • +

        asString

        +
        java.lang.String asString(java.nio.charset.Charset charset)
        +                          throws FetchException
        +
        Convenience method to capture all the Blob data as a single String, + decoded against the given charset. Call within a transaction scope to + ensure the data does not change while the String is being built.
        +
        Parameters:
        charset - character set to decode String
        +
        Throws:
        +
        java.lang.IllegalArgumentException - if resulting String length would be + greater than Integer.MAX_VALUE
        +
        java.lang.OutOfMemoryError - if not enough memory to hold Blob as a single String
        +
        FetchException
        +
      • +
      + + + +
        +
      • +

        openOutputStream

        +
        java.io.OutputStream openOutputStream()
        +                                      throws PersistException
        +
        Returns an OutputStream for writing Blob data, positioned at the + start. The Blob implementation selects an appropriate buffer size for + the stream.
        +
        Returns:
        OutputStream for this Blob, which is not guaranteed to be thread-safe
        +
        Throws:
        +
        java.lang.IllegalArgumentException - if position is negative
        +
        PersistException
        +
      • +
      + + + +
        +
      • +

        openOutputStream

        +
        java.io.OutputStream openOutputStream(long pos)
        +                                      throws PersistException
        +
        Returns an OutputStream for writing Blob data. The Blob implementation + selects an appropriate buffer size for the stream.
        +
        Parameters:
        pos - desired zero-based position to write to
        +
        Returns:
        OutputStream for this Blob, which is not guaranteed to be thread-safe
        +
        Throws:
        +
        java.lang.IllegalArgumentException - if position is negative
        +
        PersistException
        +
      • +
      + + + +
        +
      • +

        openOutputStream

        +
        java.io.OutputStream openOutputStream(long pos,
        +                                    int bufferSize)
        +                                      throws PersistException
        +
        Returns an OutputStream for writing Blob data. A suggested buffer size + must be provided, but it might be ignored by the Blob implementation.
        +
        Parameters:
        pos - desired zero-based position to write to
        bufferSize - suggest that the output stream buffer be at least this large (in bytes)
        +
        Returns:
        OutputStream for this Blob, which is not guaranteed to be thread-safe
        +
        Throws:
        +
        java.lang.IllegalArgumentException - if position is negative
        +
        PersistException
        +
      • +
      + + + +
        +
      • +

        setLength

        +
        void setLength(long length)
        +               throws PersistException
        +
        Set the length of this Blob, in bytes. If the new length is shorter, the + Blob is truncated. If the new length is longer, the Blob is padded with + zeros.
        +
        Parameters:
        length - new length to set to
        +
        Throws:
        +
        java.lang.IllegalArgumentException - if length is negative
        +
        PersistDeniedException - if Blob is read-only
        +
        PersistException
        +
      • +
      + + + +
        +
      • +

        setValue

        +
        void setValue(java.lang.String value)
        +              throws PersistException
        +
        Convenience method to overwrite all Blob data with the value of a single + String, applying UTF-8 encoding. The Blob length may grow or shrink, to + match the encoded String value. Call within a transaction scope to + ensure the data and length does not change while the value is set.
        +
        Parameters:
        value - Blob is overwritten with this value
        +
        Throws:
        +
        java.lang.IllegalArgumentException - if value is null
        +
        PersistException
        +
      • +
      + + + +
        +
      • +

        setValue

        +
        void setValue(java.lang.String value,
        +            java.lang.String charsetName)
        +              throws PersistException
        +
        Convenience method to overwrite all Blob data with the value of a single + String, applying the given charset encoding. The Blob length may grow or + shrink, to match the encoded String value. Call within a transaction + scope to ensure the data and length does not change while the value is + set.
        +
        Parameters:
        value - Blob is overwritten with this value
        charsetName - name of character set to encode String
        +
        Throws:
        +
        java.nio.charset.IllegalCharsetNameException - if the given charset name is illegal
        +
        java.lang.IllegalArgumentException - if value is null
        +
        PersistException
        +
      • +
      + + + +
        +
      • +

        setValue

        +
        void setValue(java.lang.String value,
        +            java.nio.charset.Charset charset)
        +              throws PersistException
        +
        Convenience method to overwrite all Blob data with the value of a single + String, applying the given charset encoding. The Blob length may grow or + shrink, to match the encoded String value. Call within a transaction + scope to ensure the data and length does not change while the value is + set.
        +
        Parameters:
        value - Blob is overwritten with this value
        charset - character set to encode String
        +
        Throws:
        +
        java.lang.IllegalArgumentException - if value is null
        +
        PersistException
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + +
+ + +

Copyright © 2006-2013 Amazon Technologies, Inc.. All Rights Reserved.

+ + -- cgit v1.2.3