From 780b92ada9afcf1d58085a83a0b9e6bc982203d1 Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 17 Feb 2015 17:25:57 +0000 Subject: Imported from /home/lorry/working-area/delta_berkeleydb/db-6.1.23.tar.gz. --- docs/java/com/sleepycat/util/FastOutputStream.html | 1435 +++++++++----------- 1 file changed, 678 insertions(+), 757 deletions(-) (limited to 'docs/java/com/sleepycat/util/FastOutputStream.html') diff --git a/docs/java/com/sleepycat/util/FastOutputStream.html b/docs/java/com/sleepycat/util/FastOutputStream.html index 8fb03783..391f6a09 100644 --- a/docs/java/com/sleepycat/util/FastOutputStream.html +++ b/docs/java/com/sleepycat/util/FastOutputStream.html @@ -1,785 +1,706 @@ - - - - - -FastOutputStream (Oracle - Berkeley DB Java API) - - - - - - - - - - - - -
- - +//--> + + - - - - - - - - - - - - - - - - -
-Berkeley DB
version 5.3.21
-
- + + +
+ + +
+ + + - -
-

- -com.sleepycat.util -
-Class FastOutputStream

-
-java.lang.Object
-  extended by java.io.OutputStream
-      extended by com.sleepycat.util.FastOutputStream
-
-
-
All Implemented Interfaces:
Closeable, Flushable
-
-
-
Direct Known Subclasses:
TupleOutput
-
-
-
-
public class FastOutputStream
extends OutputStream
- - -

-A replacement for ByteArrayOutputStream that does not synchronize every +

+
com.sleepycat.util
+

Class FastOutputStream

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Closeable, java.io.Flushable, java.lang.AutoCloseable
    +
    +
    +
    Direct Known Subclasses:
    +
    TupleOutput
    +
    +
    +
    +
    public class FastOutputStream
    +extends java.io.OutputStream
    +
    A replacement for ByteArrayOutputStream that does not synchronize every byte read. -

    This class extends OutputStream and its write() +

    This class extends OutputStream and its write() methods allow it to be used as a standard output stream. In addition, it provides writeFast() methods that are not declared to throw IOException. IOException is never thrown by this - class.

    -

    - -

    -


    - -

    + class.

    +
  • +
+
+
+
    +
  • - - - - - - - - - - - - - - -
    -Field Summary
    -static intDEFAULT_BUMP_SIZE - -
    -          The default amount that the buffer is increased when it is full.
    -static intDEFAULT_INIT_SIZE - -
    -          The default initial size of the buffer if no initialSize parameter is - specified.
    -  +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      static intDEFAULT_BUMP_SIZE +
      The default amount that the buffer is increased when it is full.
      +
      static intDEFAULT_INIT_SIZE +
      The default initial size of the buffer if no initialSize parameter is + specified.
      +
      +
    • +
    - - - - - - - - - - - - - - - - - - - - - -
    -Constructor Summary
    FastOutputStream() - -
    -          Creates an output stream with default sizes.
    FastOutputStream(byte[] buffer) - -
    -          Creates an output stream with a given initial buffer and a default - bump size.
    FastOutputStream(byte[] buffer, - int bumpSize) - -
    -          Creates an output stream with a given initial buffer and a given - bump size.
    FastOutputStream(int initialSize) - -
    -          Creates an output stream with a default bump size and a given initial - size.
    FastOutputStream(int initialSize, - int bumpSize) - -
    -          Creates an output stream with a given bump size and initial size.
    -  +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + + + + + + + + + +
      Constructors 
      Constructor and Description
      FastOutputStream() +
      Creates an output stream with default sizes.
      +
      FastOutputStream(byte[] buffer) +
      Creates an output stream with a given initial buffer and a default + bump size.
      +
      FastOutputStream(byte[] buffer, + int bumpSize) +
      Creates an output stream with a given initial buffer and a given + bump size.
      +
      FastOutputStream(int initialSize) +
      Creates an output stream with a default bump size and a given initial + size.
      +
      FastOutputStream(int initialSize, + int bumpSize) +
      Creates an output stream with a given bump size and initial size.
      +
      +
    • +
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -Method Summary
    - voidaddSize(int sizeAdded) - -
    -          Skip the given number of bytes in the buffer.
    - byte[]getBufferBytes() - -
    -          Returns the buffer owned by this object.
    - intgetBufferLength() - -
    -          Returns the length used in the internal buffer, i.e., the offset at - which data will be written next.
    - intgetBufferOffset() - -
    -          Returns the offset of the internal buffer.
    - voidmakeSpace(int sizeNeeded) - -
    -          Ensure that at least the given number of bytes are available in the - internal buffer.
    - voidreset() - -
    -           
    - intsize() - -
    -           
    - byte[]toByteArray() - -
    -           
    - StringtoString() - -
    -           
    - StringtoString(String encoding) - -
    -           
    - voidwrite(byte[] fromBuf) - -
    -           
    - voidwrite(byte[] fromBuf, - int offset, - int length) - -
    -           
    - voidwrite(int b) - -
    -           
    - voidwriteFast(byte[] fromBuf) - -
    -          Equivalent to write(byte[]) but does not throw - IOException.
    - voidwriteFast(byte[] fromBuf, - int offset, - int length) - -
    -          Equivalent to write(byte[],int,int) but does not throw - IOException.
    - voidwriteFast(int b) - -
    -          Equivalent to write(int) but does not throw - IOException.
    - voidwriteTo(OutputStream out) - -
    -           
    - - - - - - - -
    Methods inherited from class java.io.OutputStream
    close, flush
    - - - - - - - -
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    -  -

    - +

      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Methods 
      Modifier and TypeMethod and Description
      voidaddSize(int sizeAdded) +
      Skip the given number of bytes in the buffer.
      +
      byte[]getBufferBytes() +
      Returns the buffer owned by this object.
      +
      intgetBufferLength() +
      Returns the length used in the internal buffer, i.e., the offset at + which data will be written next.
      +
      intgetBufferOffset() +
      Returns the offset of the internal buffer.
      +
      voidmakeSpace(int sizeNeeded) +
      Ensure that at least the given number of bytes are available in the + internal buffer.
      +
      voidreset() 
      intsize() 
      byte[]toByteArray() 
      java.lang.StringtoString() 
      java.lang.StringtoString(java.lang.String encoding) 
      voidwrite(byte[] fromBuf) 
      voidwrite(byte[] fromBuf, + int offset, + int length) 
      voidwrite(int b) 
      voidwriteFast(byte[] fromBuf) +
      Equivalent to write(byte[]) but does not throw + IOException.
      +
      voidwriteFast(byte[] fromBuf, + int offset, + int length) +
      Equivalent to write(byte[],int,int) but does not throw + IOException.
      +
      voidwriteFast(int b) +
      Equivalent to write(int) but does not throw + IOException.
      +
      voidwriteTo(java.io.OutputStream out) 
      +
        +
      • + + +

        Methods inherited from class java.io.OutputStream

        +close, flush
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • - - - - - - -
    -Field Detail
    - -

    -DEFAULT_INIT_SIZE

    -
    -public static final int DEFAULT_INIT_SIZE
    -
    -
    The default initial size of the buffer if no initialSize parameter is - specified. This constant is 100 bytes. -

    -

    -
    See Also:
    Constant Field Values
    -
    -
    - -

    -DEFAULT_BUMP_SIZE

    -
    -public static final int DEFAULT_BUMP_SIZE
    -
    -
    The default amount that the buffer is increased when it is full. This - constant is zero, which means to double the current buffer size. -

    -

    -
    See Also:
    Constant Field Values
    -
    - +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        DEFAULT_INIT_SIZE

        +
        public static final int DEFAULT_INIT_SIZE
        +
        The default initial size of the buffer if no initialSize parameter is + specified. This constant is 100 bytes.
        +
        See Also:
        Constant Field Values
        +
      • +
      + + + +
        +
      • +

        DEFAULT_BUMP_SIZE

        +
        public static final int DEFAULT_BUMP_SIZE
        +
        The default amount that the buffer is increased when it is full. This + constant is zero, which means to double the current buffer size.
        +
        See Also:
        Constant Field Values
        +
      • +
      +
    • +
    - - - - - - -
    -Constructor Detail
    - -

    -FastOutputStream

    -
    -public FastOutputStream()
    -
    -
    Creates an output stream with default sizes. -

    -

    -
    - -

    -FastOutputStream

    -
    -public FastOutputStream(int initialSize)
    -
    -
    Creates an output stream with a default bump size and a given initial - size. -

    -

    -
    Parameters:
    initialSize - the initial size of the buffer.
    -
    -
    - -

    -FastOutputStream

    -
    -public FastOutputStream(int initialSize,
    -                        int bumpSize)
    -
    -
    Creates an output stream with a given bump size and initial size. -

    -

    -
    Parameters:
    initialSize - the initial size of the buffer.
    bumpSize - the amount to increment the buffer.
    -
    -
    - -

    -FastOutputStream

    -
    -public FastOutputStream(byte[] buffer)
    -
    -
    Creates an output stream with a given initial buffer and a default - bump size. -

    -

    -
    Parameters:
    buffer - the initial buffer; will be owned by this object.
    -
    -
    - -

    -FastOutputStream

    -
    -public FastOutputStream(byte[] buffer,
    -                        int bumpSize)
    -
    -
    Creates an output stream with a given initial buffer and a given - bump size. -

    -

    -
    Parameters:
    buffer - the initial buffer; will be owned by this object.
    bumpSize - the amount to increment the buffer. If zero (the +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        FastOutputStream

        +
        public FastOutputStream()
        +
        Creates an output stream with default sizes.
        +
      • +
      + + + +
        +
      • +

        FastOutputStream

        +
        public FastOutputStream(int initialSize)
        +
        Creates an output stream with a default bump size and a given initial + size.
        +
        Parameters:
        initialSize - the initial size of the buffer.
        +
      • +
      + + + +
        +
      • +

        FastOutputStream

        +
        public FastOutputStream(int initialSize,
        +                int bumpSize)
        +
        Creates an output stream with a given bump size and initial size.
        +
        Parameters:
        initialSize - the initial size of the buffer.
        bumpSize - the amount to increment the buffer.
        +
      • +
      + + + +
        +
      • +

        FastOutputStream

        +
        public FastOutputStream(byte[] buffer)
        +
        Creates an output stream with a given initial buffer and a default + bump size.
        +
        Parameters:
        buffer - the initial buffer; will be owned by this object.
        +
      • +
      + + + +
        +
      • +

        FastOutputStream

        +
        public FastOutputStream(byte[] buffer,
        +                int bumpSize)
        +
        Creates an output stream with a given initial buffer and a given + bump size.
        +
        Parameters:
        buffer - the initial buffer; will be owned by this object.
        bumpSize - the amount to increment the buffer. If zero (the default), the current buffer size will be doubled when the buffer is - full.
        -
    - + full.
    +
  • +
+ + - - - - - - -
-Method Detail
- -

-size

-
-public int size()
-
-
-
-
-
-
- -

-reset

-
-public void reset()
-
-
-
-
-
-
- -

-write

-
-public void write(int b)
-
-
-
Specified by:
write in class OutputStream
-
-
-
-
-
-
- -

-write

-
-public void write(byte[] fromBuf)
-
-
-
Overrides:
write in class OutputStream
-
-
-
-
-
-
- -

-write

-
-public void write(byte[] fromBuf,
-                  int offset,
-                  int length)
-
-
-
Overrides:
write in class OutputStream
-
-
-
-
-
-
- -

-writeTo

-
-public void writeTo(OutputStream out)
-             throws IOException
-
-
- -
Throws: -
IOException
-
-
-
- -

-toString

-
-public String toString()
-
-
-
Overrides:
toString in class Object
-
-
-
-
-
-
- -

-toString

-
-public String toString(String encoding)
-                throws UnsupportedEncodingException
-
-
- -
Throws: -
UnsupportedEncodingException
-
-
-
- -

-toByteArray

-
-public byte[] toByteArray()
-
-
-
-
-
-
- -

-writeFast

-
-public final void writeFast(int b)
-
-
Equivalent to write(int) but does not throw - IOException. -

-

-
See Also:
write(int)
-
-
-
- -

-writeFast

-
-public final void writeFast(byte[] fromBuf)
-
-
Equivalent to write(byte[]) but does not throw - IOException. -

-

-
See Also:
write(byte[])
-
-
-
- -

-writeFast

-
-public final void writeFast(byte[] fromBuf,
-                            int offset,
-                            int length)
-
-
Equivalent to write(byte[],int,int) but does not throw - IOException. -

-

-
See Also:
write(byte[],int,int)
-
-
-
- -

-getBufferBytes

-
-public byte[] getBufferBytes()
-
-
Returns the buffer owned by this object. -

-

- -
Returns:
the buffer.
-
-
-
- -

-getBufferOffset

-
-public int getBufferOffset()
-
-
Returns the offset of the internal buffer. -

-

- -
Returns:
always zero currently.
-
-
-
- -

-getBufferLength

-
-public int getBufferLength()
-
-
Returns the length used in the internal buffer, i.e., the offset at - which data will be written next. -

-

- -
Returns:
the buffer length.
-
-
-
- -

-makeSpace

-
-public void makeSpace(int sizeNeeded)
-
-
Ensure that at least the given number of bytes are available in the - internal buffer. -

-

-
Parameters:
sizeNeeded - the number of bytes desired.
-
-
-
- -

-addSize

-
-public void addSize(int sizeAdded)
-
-
Skip the given number of bytes in the buffer. -

-

-
Parameters:
sizeAdded - number of bytes to skip.
-
-
+
    +
  • + + +

    Method Detail

    + + + +
      +
    • +

      size

      +
      public int size()
      +
    • +
    + + + +
      +
    • +

      reset

      +
      public void reset()
      +
    • +
    + + + +
      +
    • +

      write

      +
      public void write(int b)
      +
      +
      Specified by:
      +
      write in class java.io.OutputStream
      +
      +
    • +
    + + + +
      +
    • +

      write

      +
      public void write(byte[] fromBuf)
      +
      +
      Overrides:
      +
      write in class java.io.OutputStream
      +
      +
    • +
    + + + +
      +
    • +

      write

      +
      public void write(byte[] fromBuf,
      +         int offset,
      +         int length)
      +
      +
      Overrides:
      +
      write in class java.io.OutputStream
      +
      +
    • +
    + + + +
      +
    • +

      writeTo

      +
      public void writeTo(java.io.OutputStream out)
      +             throws java.io.IOException
      +
      Throws:
      +
      java.io.IOException
      +
    • +
    + + + +
      +
    • +

      toString

      +
      public java.lang.String toString()
      +
      +
      Overrides:
      +
      toString in class java.lang.Object
      +
      +
    • +
    + + + +
      +
    • +

      toString

      +
      public java.lang.String toString(java.lang.String encoding)
      +                          throws java.io.UnsupportedEncodingException
      +
      Throws:
      +
      java.io.UnsupportedEncodingException
      +
    • +
    + + + +
      +
    • +

      toByteArray

      +
      public byte[] toByteArray()
      +
    • +
    + + + +
      +
    • +

      writeFast

      +
      public final void writeFast(int b)
      +
      Equivalent to write(int) but does not throw + IOException.
      +
      See Also:
      write(int)
      +
    • +
    + + + +
      +
    • +

      writeFast

      +
      public final void writeFast(byte[] fromBuf)
      +
      Equivalent to write(byte[]) but does not throw + IOException.
      +
      See Also:
      write(byte[])
      +
    • +
    + + + +
      +
    • +

      writeFast

      +
      public final void writeFast(byte[] fromBuf,
      +             int offset,
      +             int length)
      +
      Equivalent to write(byte[],int,int) but does not throw + IOException.
      +
      See Also:
      write(byte[],int,int)
      +
    • +
    + + + +
      +
    • +

      getBufferBytes

      +
      public byte[] getBufferBytes()
      +
      Returns the buffer owned by this object.
      +
      Returns:
      the buffer.
      +
    • +
    + + + +
      +
    • +

      getBufferOffset

      +
      public int getBufferOffset()
      +
      Returns the offset of the internal buffer.
      +
      Returns:
      always zero currently.
      +
    • +
    + + + +
      +
    • +

      getBufferLength

      +
      public int getBufferLength()
      +
      Returns the length used in the internal buffer, i.e., the offset at + which data will be written next.
      +
      Returns:
      the buffer length.
      +
    • +
    + + + +
      +
    • +

      makeSpace

      +
      public void makeSpace(int sizeNeeded)
      +
      Ensure that at least the given number of bytes are available in the + internal buffer.
      +
      Parameters:
      sizeNeeded - the number of bytes desired.
      +
    • +
    + + + +
      +
    • +

      addSize

      +
      public void addSize(int sizeAdded)
      +
      Skip the given number of bytes in the buffer.
      +
      Parameters:
      sizeAdded - number of bytes to skip.
      +
    • +
    +
  • +
+ + +
+
-
- - - - - - - - - - - - - - - - - - -
-Berkeley DB
version 5.3.21
-
- + + +
+ + +
+ + + - -
-Copyright (c) 1996, 2012 Oracle and/or its affiliates. All rights reserved. - - +

Copyright (c) 1996, 2015 Oracle and/or its affiliates. All rights reserved.

+ + -- cgit v1.2.1