Integer8 and Integer8Comparer class implementation
[platform/framework/native/appfw.git] / inc / FBaseByteBuffer.h
index a85c68e..ad5d64d 100644 (file)
@@ -1,5 +1,4 @@
 //
-// Open Service Platform
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Apache License, Version 2.0 (the License);
@@ -21,7 +20,6 @@
  *
  * This header file contains the declarations of the %ByteBuffer class.
  */
-
 #ifndef _FBASE_BYTE_BUFFER_H_
 #define _FBASE_BYTE_BUFFER_H_
 
@@ -76,7 +74,7 @@ namespace Tizen { namespace Base
  *
  *             // Flips the buf
  *             buf.Flip();
- *             // Now, position = 0 and limit = 5        
+ *             // Now, position = 0 and limit = 5
  *
  *             // Reads bytes from the buf using "relative access method"
  *             while (buf.HasRemaining())
@@ -160,7 +158,7 @@ public:
         * @exception   E_SUCCESS               The method is successful.
         * @exception   E_INVALID_ARG   A specified input parameter is invalid, or
         *                                                              the source buffer is not constructed.
-        * @see                         ByteBuffer()
+        * @see                                                 ByteBuffer()
         */
        result Construct(const ByteBuffer& buffer);
 
@@ -174,7 +172,7 @@ public:
         * @exception   E_SUCCESS               The method is successful.
         * @exception   E_INVALID_ARG   A specified input parameter is invalid, or
         *                                              the specified @c capacity is negative.
-        * @see                         ByteBuffer()
+        * @see                                                 ByteBuffer()
         */
        result Construct(int capacity);
 
@@ -183,18 +181,18 @@ public:
        *
        * @since 2.0
        *
-       * @return           An error code
-       * @param[in]       pBuffer                The buffer which is shared
-       * @param[in]       index                  The starting index of the buffer from where the first @c byte value is read
-       * @param[in]       length                 The number of bytes to read from the given buffer @n This is a limit of this instance.
-       * @param[in]       capacity               The capacity of this instance
-       * @exception       E_SUCCESS           The method is successful.
-       * @exception       E_INVALID_ARG     A specified input parameter is invalid, or
-       *                                               the @c pBuffer is @c null.
-       * @exception       E_OUT_OF_RANGE  The specified index is outside the bounds of the data structure, or
-       *                                               the @c index is larger than the @c length.
+       * @return                       An error code
+       * @param[in]            pBuffer                         The buffer which is shared
+       * @param[in]            index                           The starting index of the buffer from where the first @c byte value is read
+       * @param[in]            length                          The number of bytes to read from the given buffer @n This is a limit of this instance.
+       * @param[in]            capacity                        The capacity of this instance
+       * @exception            E_SUCCESS                       The method is successful.
+       * @exception            E_INVALID_ARG           A specified input parameter is invalid, or
+       *                                                                               the @c pBuffer is @c null.
+       * @exception       E_OUT_OF_RANGE       The specified index is outside the bounds of the data structure, or
+       *                                                                               the @c index is larger than the @c length.
        */
-       result Construct(const byte *pBuffer, int index, int length, int capacity);
+       result Construct(const bytepBuffer, int index, int length, int capacity);
 
        /**
         * Gets the reference to the byte value at the specified index.
@@ -226,10 +224,10 @@ public:
         * @return              @c true if the input buffer is equal to the calling %ByteBuffer instance, @n
         *                              else @c false
         * @param[in]   buffer  The %ByteBuffer instance to compare with the current instance
-        * @remarks             This method returns @c true only if the two buffers have the same number of
+        * @remarks                     This method returns @c true only if the two buffers have the same number of
         *                                              remaining elements, and the two sequences of remaining elements are equal
         *                                              (considered independently, irrespective of their starting positions).
-        * @see                         Equals()
+        * @see                                 Equals()
         */
        bool operator ==(const ByteBuffer& buffer) const;
 
@@ -241,20 +239,20 @@ public:
         * @return              @c true if the two objects are not the same, @n
         *                              else @c false
         * @param[in]   buffer  The buffer to compare with the current instance
-        * @remarks             This method returns @c false only if the two buffers being compared have the same
+        * @remarks                     This method returns @c false only if the two buffers being compared have the same
         *                                              number of remaining elements, and the two sequences of remaining elements are equal
         *                                              (considered independently, irrespective of their starting positions).
-        * @see                         Equals()
+        * @see                                 Equals()
         */
        bool operator !=(const ByteBuffer& buffer) const;
 
        /**
         * Creates a new @c double buffer view for the content of the byte buffer.
-        *      
+        *
         * @since 2.0
         *
         * @return              DoubleBuffer A pointer to the current position of the calling object
-        * @remarks             The content of the view buffer starts at the current position of the calling buffer.
+        * @remarks     The content of the view buffer starts at the current position of the calling buffer.
         *                              The new buffer's position is zero, the mark is undefined, and the capacity and limit
         *                              are equal to the remaining part of this buffer divided by the size of @c double.
         *                              Any change to the byte buffer content is visible in the @c double buffer view, and vice versa.
@@ -264,10 +262,10 @@ public:
        /**
         * Creates a new @c float buffer view for the content of the byte buffer.
         *
-        * @since 2.0   
+        * @since 2.0
         *
         * @return              FloatBuffer A pointer to the current position of the calling buffer
-        * @remarks             The content of the view buffer starts at the current position of the calling buffer.
+        * @remarks     The content of the view buffer starts at the current position of the calling buffer.
         *                              The new buffer's position is zero, the mark is undefined, and the capacity and limit
         *                              are equal to the remaining part of the calling buffer divided by the size of @c float.
         *                              Any change to the byte buffer content is visible in the @c float buffer view, and vice versa.
@@ -277,10 +275,10 @@ public:
        /**
         * Creates a new @c int buffer view for the content of the byte buffer.
         *
-        * @since 2.0   
+        * @since 2.0
         *
         * @return              IntBuffer A pointer to the current position of the calling buffer
-        * @remarks             The content of the view buffer starts at the current position of the calling buffer.
+        * @remarks     The content of the view buffer starts at the current position of the calling buffer.
         *                              The new buffer's position is zero, the mark is undefined, and the capacity and limit
         *                              are equal to the remaining part of calling buffer divided by the size of @c int.
         *                              Any change to the byte buffer content is visible in the Int buffer view, and vice versa.
@@ -290,10 +288,10 @@ public:
        /**
         * Creates a new @c long buffer view for the content of the byte buffer.
         *
-        * @since 2.0   
+        * @since 2.0
         *
         * @return              LongBuffer A pointer to the current position of the calling buffer
-        * @remarks             The content of the view buffer starts at the current position of this buffer.
+        * @remarks     The content of the view buffer starts at the current position of this buffer.
         *                              The new buffer's position is zero, the mark is undefined, and the capacity and limit
         *                              are equal to the remaining part of calling buffer divided by the size of @c long.
         *                              Any change to the byte buffer content is visible in the @c long buffer view, and vice versa.
@@ -303,10 +301,10 @@ public:
        /**
         * Creates a new @c long @c long buffer view for the content of the byte buffer.
         *
-        * @since 2.0   
+        * @since 2.0
         *
         * @return              LongLongBuffer A pointer to the current position of the calling buffer
-        * @remarks             The content of the view buffer starts at the current position of this buffer.
+        * @remarks     The content of the view buffer starts at the current position of this buffer.
         *                              The new buffer's position is zero, the mark is undefined, and the capacity and limit
         *                              are equal to the remaining part of calling buffer divided by the size of @c long.
         *                              Any change to the byte buffer content is visible in the @c long @c long buffer view, and vice versa.
@@ -320,10 +318,10 @@ public:
         * @brief       <i> [Deprecated] </i>
         * @deprecated This method is deprecated as @c mchar type is changed to @c wchar_t type.
         * Instead of using this method, use the AsWcharBufferN() method.
-        * @since 2.0   
+        * @since 2.0
         *
         * @return              McharBuffer A pointer to the current position of the calling buffer
-        * @remarks             The content of the view buffer starts at the current position of this buffer.
+        * @remarks     The content of the view buffer starts at the current position of this buffer.
         *                              The new buffer's position is zero, the mark is undefined, and the capacity and limit
         *                              are equal to the remaining part of the calling buffer divided by the size of @c long.
         *                              Any change to the byte buffer content is visible in the @c mchar buffer view, and vice versa.
@@ -337,7 +335,7 @@ public:
         * @since 2.0
         *
         * @return              WcharBuffer pointer to the current position of the calling buffer
-        * @remarks             The content of the view buffer start at the current position of this buffer. @n
+        * @remarks     The content of the view buffer start at the current position of this buffer. @n
         *                              The new buffer's position is zero, the mark is undefined, and the capacity and limit
         *                              are equal to the remaining part of the calling buffer divided by the size of @c long. @n
         *                              Any changes to the calling buffer's content (that is, the content of %ByteBuffer instance) @n
@@ -351,7 +349,7 @@ public:
         * @since 2.0
         *
         * @return              ShortBuffer pointer to the current position of the calling buffer
-        * @remarks             The content of the view buffer starts at the current position of this buffer.
+        * @remarks     The content of the view buffer starts at the current position of this buffer.
         *                              The new buffer's position is zero, the mark is undefined, and the capacity and limit
         *                              are equal to the remaining part of calling buffer divided by the size of @c long.
         *                              Any change to the byte buffer content is visible in the @c short buffer view, and vice versa.
@@ -375,7 +373,7 @@ public:
         * @exception   E_OVERFLOW              The operation (arithmetic/casting/conversion) has caused an overflow. @n
         *                                                              The number of remaining bytes of the current buffer is smaller than
         *                                                              the number of remaining bytes of the input buffer.
-        * @remarks             After the copy operation, the current (destination) buffer's position and the given
+        * @remarks     After the copy operation, the current (destination) buffer's position and the given
         *                              (source) buffer's positions are incremented by the number of bytes copied (the number of
         *                              remaining bytes of the given buffer). @n
         *                              If the remaining part of the current instance is greater than or equal to the remaining part of the input instance,
@@ -418,7 +416,7 @@ public:
         * The following example has exactly the same effect as the above %CopyFrom() method.
         *
         * @code
-        *      
+        *
         *      int copyNum = srcBuf.GetRemaining();
         *      for (int i = 0; i < copyNum; i++)
         *      {
@@ -451,7 +449,7 @@ public:
         *                                                              The @c index or @c length is less than @c 0.
         * @exception   E_UNDERFLOW             The operation (arithmetic/casting/conversion) has caused an underflow, or
         *                                                              the remaining bytes of this buffer are smaller than @c length.
-        * @remarks             This method copies @c length bytes from the current instance of %ByteBuffer to the given array,
+        * @remarks     This method copies @c length bytes from the current instance of %ByteBuffer to the given array,
         *                              starting at the current position and at the given index in the array.
         *                              After the copy operation, the position is incremented by @c length bytes.
         * @see                 SetArray()
@@ -465,7 +463,7 @@ public:
         * @since 2.0
         *
         * @return              An error code
-        * @param[out]  value           The @c byte value at the current position in the %ByteBuffer instance
+        * @param[out]  value                   The @c byte value at the current position in the %ByteBuffer instance
         * @exception   E_SUCCESS               The method is successful.
         * @exception   E_UNDERFLOW             The operation (arithmetic/casting/conversion) has caused an underflow, or
         *                                                              the current position is not smaller than the limit.
@@ -481,7 +479,7 @@ public:
         *
         * @return              An error code
         * @param[in]   index           The index of the current %ByteBuffer instance, from which the byte is read
-        * @param[out]  value           The @c byte value at the given @c index
+        * @param[out]  value       The @c byte value at the given @c index
         * @exception   E_SUCCESS               The method is successful.
         * @exception   E_OUT_OF_RANGE  The specified index is outside the bounds of the data structure, or
         *                                                              the @c index is not smaller than the limit or less than @c 0.
@@ -497,11 +495,11 @@ public:
         * @since 2.0
         *
         * @return              An error code
-        * @param[out]  value           The @c double value at the current position in the %ByteBuffer instance
+        * @param[out]  value                   The @c double value at the current position in the %ByteBuffer instance
         * @exception   E_SUCCESS               The method is successful.
         * @exception   E_UNDERFLOW             The operation (arithmetic/casting/conversion) has caused an underflow, or
         *                                                              the remaining bytes of this buffer are smaller than the size of @c double.
-        * @remarks             This method reads the next size of @c double number of bytes at the current position,
+        * @remarks     This method reads the next size of @c double number of bytes at the current position,
         *                              composing it into a @c double value, and then increments the position by the size of @c double.
         * @see                 SetDouble()
         */
@@ -519,7 +517,7 @@ public:
         * @exception   E_SUCCESS                       The method is successful.
         * @exception   E_OUT_OF_RANGE          The specified @c index is outside the bounds of the data structure, or
         *                                                                      the @c index is larger than the limit minus size of @c double or less than @c 0.
-        * @remarks             This method reads size of @c double number of bytes at the given index,
+        * @remarks     This method reads size of @c double number of bytes at the given index,
         *                              composing them into a @c double value.
         * @see                 SetDouble()
         */
@@ -533,11 +531,11 @@ public:
         * @since 2.0
         *
         * @return              An error code
-        * @param[out]  value           The @c float value at the current position in the %ByteBuffer instance
+        * @param[out]  value                           The @c float value at the current position in the %ByteBuffer instance
         * @exception   E_SUCCESS                       The method is successful.
         * @exception   E_UNDERFLOW                     The operation (arithmetic/casting/conversion) has caused an underflow, or
         *                                                                      the remaining bytes of this buffer are smaller than the size of @c float.
-        * @remarks             This method reads the next size of @c float number of bytes at the current position,
+        * @remarks     This method reads the next size of @c float number of bytes at the current position,
         *                              composing it into a @c float value, and then increments the position by the size of @c float.
         * @see                 SetFloat()
         */
@@ -550,12 +548,12 @@ public:
         * @since 2.0
         *
         * @return              An error code
-        * @param[in]   index           The index of the current %ByteBuffer instance, from which the bytes are read
-        * @param[out]  value           The @c float value at the given index
+        * @param[in]   index       The index of the current %ByteBuffer instance, from which the bytes are read
+        * @param[out]  value       The @c float value at the given index
         * @exception   E_SUCCESS                       The method is successful.
         * @exception   E_OUT_OF_RANGE          The specified index is outside the bounds of the data structure, or
         *                                                                      the @c index is larger than the limit minus size of @c float or less than @c 0.
-        * @remarks             This method reads the size of @c float number of bytes at the given index,
+        * @remarks     This method reads the size of @c float number of bytes at the given index,
         *                              composing it into a @c float value.
         * @see                 SetFloat()
         */
@@ -569,11 +567,11 @@ public:
         * @since 2.0
         *
         * @return              An error code
-        * @param[out]  value           The @c int value at the current position in the %ByteBuffer instance
+        * @param[out]  value                           The @c int value at the current position in the %ByteBuffer instance
         * @exception   E_SUCCESS                       The method is successful.
         * @exception   E_UNDERFLOW                     The operation (arithmetic/casting/conversion) has caused an underflow, or
         *                                                                      the remaining bytes of this buffer are smaller than the size of @c int.
-        * @remarks             This method reads the next size of @c int number of bytes at the current position,
+        * @remarks     This method reads the next size of @c int number of bytes at the current position,
         *                              composing them into an @c int value, and then increments the position by the size of @c int.
         * @see                 SetInt()
         */
@@ -586,12 +584,12 @@ public:
         * @since 2.0
         *
         * @return              An error code
-        * @param[in]   index           The index of the current %ByteBuffer instance, from which the bytes are read
-        * @param[out]  value           The @c int value at the given index
+        * @param[in]   index       The index of the current %ByteBuffer instance, from which the bytes are read
+        * @param[out]  value       The @c int value at the given index
         * @exception   E_SUCCESS                       The method is successful.
         * @exception   E_OUT_OF_RANGE          The specified index is outside the bounds of the data structure, or
         *                                                                      the @c index is larger than the limit minus size of @c int or negative.
-        * @remarks             This method reads the size of @c int number of bytes at the given index,
+        * @remarks     This method reads the size of @c int number of bytes at the given index,
         *                              composing it into an @c int value.
         * @see                 SetInt()
         */
@@ -605,11 +603,11 @@ public:
         * @since 2.0
         *
         * @return              An error code
-        * @param[out]  value           The @c long value at the current position in the %ByteBuffer instance
+        * @param[out]  value                           The @c long value at the current position in the %ByteBuffer instance
         * @exception   E_SUCCESS                       The method is successful.
         * @exception   E_UNDERFLOW                     The operation (arithmetic/casting/conversion) has caused an underflow, or
         *                                                                      the remaining bytes of this buffer are smaller than the size of @c long.
-        * @remarks             This method reads the next size of @c long number of bytes at the current position,
+        * @remarks     This method reads the next size of @c long number of bytes at the current position,
         *                              composing it into a @c long value, and then increments the position by the size of @c long.
         * @see                 SetLong()
         */
@@ -622,12 +620,12 @@ public:
         * @since 2.0
         *
         * @return              An error code
-        * @param[in]   index           The index of the current %ByteBuffer instance, from which the bytes are read
-        * @param[out]  value           The @c long value at the given index
+        * @param[in]   index       The index of the current %ByteBuffer instance, from which the bytes are read
+        * @param[out]  value       The @c long value at the given index
         * @exception   E_SUCCESS                       The method is successful.
         * @exception   E_OUT_OF_RANGE          The specified @c index is outside the bounds of the data structure, or
         *                                                                      the @c index is larger than the limit minus size of @c long or less than @c 0.
-        * @remarks             This method reads the size of @c long number of bytes at the given index,
+        * @remarks     This method reads the size of @c long number of bytes at the given index,
         *                              composing it into a @c long value.
         * @see                 SetLong()
         */
@@ -641,14 +639,14 @@ public:
         * @since 2.0
         *
         * @return              An error code
-        * @param[out]  value           The @c long @c long value at the current position in the %ByteBuffer instance
+        * @param[out]  value                           The @c long @c long value at the current position in the %ByteBuffer instance
         * @exception   E_SUCCESS                       The method is successful.
         * @exception   E_UNDERFLOW                     The operation (arithmetic/casting/conversion) has caused an underflow, or
         *                                                                      the remaining bytes of this buffer are smaller than the size of @c long @c long.
-        * @remarks             This method reads the next size of @c long @c long number of bytes at the current position,
+        * @remarks     This method reads the next size of @c long @c long number of bytes at the current position,
         *                              composing it into a @c long @c long value, and then increments the position by the size of @c long @c long.
         * @see                 SetLongLong()
-        */     
+        */
        result GetLongLong(long long& value);
 
        /**
@@ -658,12 +656,12 @@ public:
         * @since 2.0
         *
         * @return              An error code
-        * @param[in]   index           The index of the current %ByteBuffer instance, from which the bytes are read
-        * @param[out]  value           The @c long @c long value at the given index
+        * @param[in]   index       The index of the current %ByteBuffer instance, from which the bytes are read
+        * @param[out]  value       The @c long @c long value at the given index
         * @exception   E_SUCCESS                       The method is successful.
         * @exception   E_OUT_OF_RANGE          The specified index is outside the bounds of the data structure, or
         *                                                                      the @c index is larger than the limit minus size of @c long @c long or less than @c 0.
-        * @remarks             This method reads the size of @c long @c long number of bytes at the given index,
+        * @remarks     This method reads the size of @c long @c long number of bytes at the given index,
         *                              composing it into a @c long @c long value.
         * @see                 SetLongLong()
         */
@@ -681,11 +679,11 @@ public:
         * @since 2.0
         *
         * @return              An error code
-        * @param[out]  value       The @c wchar_t value at the current position in the %ByteBuffer instance
+        * @param[out]  value                   The @c wchar_t value at the current position in the %ByteBuffer instance
         * @exception   E_SUCCESS               The method is successful.
         * @exception   E_UNDERFLOW             The operation (arithmetic/casting/conversion) has caused an underflow, or
         *                                                              the remaining bytes of this buffer are smaller than the size of @c wchar_t.
-        * @remarks             This method reads the next size of @c wchar_t number of bytes at the current position,
+        * @remarks     This method reads the next size of @c wchar_t number of bytes at the current position,
         *                              composing it into a @c wchar_t value, and then increments the position by the size of @c wchar_t.
         * @see                 SetMchar()
         * @endif
@@ -699,13 +697,13 @@ public:
         *
         * @since 2.0
         *
-        * @return      An error code
-        * @param[out]  value       The @c wchar_t value at the current position in the %ByteBuffer instance
-        * @exception   E_SUCCESS               The method is successful.
-        * @exception   E_UNDERFLOW          The operation (arithmetic/casting/conversion) has caused an underflow, or
-        *                                                              the remaining bytes of this buffer are smaller than the size of @c wchar_t.
-        * @remarks             This method reads the next size of @c wchar_t number of bytes at the current position,
-        *                              composing it into a @c wchar_t value, and then increments the position by the size of @c wchar_t.
+        * @return  An error code
+        * @param[out]  value                   The @c wchar_t value at the current position in the %ByteBuffer instance
+        * @exception   E_SUCCESS               The method is successful.
+        * @exception   E_UNDERFLOW             The operation (arithmetic/casting/conversion) has caused an underflow, or
+        *                                                              the remaining bytes of this buffer are smaller than the size of @c wchar_t.
+        * @remarks     This method reads the next size of @c wchar_t number of bytes at the current position,
+        *                              composing it into a @c wchar_t value, and then increments the position by the size of @c wchar_t.
         * @see                 SetWchar()
         */
        result GetWchar(wchar_t& value);
@@ -726,7 +724,7 @@ public:
         * @exception   E_SUCCESS                       The method is successful.
         * @exception   E_OUT_OF_RANGE          The specified index is outside the bounds of the data structure, or
         *                                                                      the @c index is larger than the limit minus size of @c wchar_t or less than @c 0.
-        * @remarks             This method reads the size of @c wchar_t number of bytes at the given index,
+        * @remarks     This method reads the size of @c wchar_t number of bytes at the given index,
         *                              composing it into a @c wchar_t value.
         * @see                 SetMchar()
         * @endif
@@ -740,13 +738,13 @@ public:
         * @since 2.0
         *
         * @return              An error code
-        * @param[in]   index      The index of the current %ByteBuffer instance, from which the bytes are read
-        * @param[out]  value      The @c wchar_t value at the given index
-        * @exception   E_SUCCESS                       The method is successful.
-        * @exception   E_OUT_OF_RANGE                  The specified index is outside the bounds of the data structure, or
-        *                                                                      the @c index is larger than the limit minus size of @c wchar_t or less than @c 0.
-        * @remarks             This method reads the size of @c wchar_t number of bytes at the given index,
-        *                              composing it into a @c wchar_t value.
+        * @param[in]   index                   The index of the current %ByteBuffer instance, from which the bytes are read
+        * @param[out]  value                   The @c wchar_t value at the given index
+        * @exception   E_SUCCESS               The method is successful.
+        * @exception   E_OUT_OF_RANGE  The specified index is outside the bounds of the data structure, or
+        *                                                              the @c index is larger than the limit minus size of @c wchar_t or less than @c 0.
+        * @remarks     This method reads the size of @c wchar_t number of bytes at the given index,
+        *                              composing it into a @c wchar_t value.
         * @see                 SetWchar()
         */
        result GetWchar(int index, wchar_t& value) const;
@@ -759,11 +757,11 @@ public:
         * @since 2.0
         *
         * @return              An error code
-        * @param[out]  value           The @c short value at the current position in the %ByteBuffer instance
+        * @param[out]  value                           The @c short value at the current position in the %ByteBuffer instance
         * @exception   E_SUCCESS                       The method is successful.
         * @exception   E_UNDERFLOW                     The operation (arithmetic/casting/conversion) has caused an underflow, or
         *                                                                      the remaining bytes of this buffer are smaller than the size of @c short.
-        * @remarks             This method reads the next size of @c short number of bytes at the current position,
+        * @remarks     This method reads the next size of @c short number of bytes at the current position,
         *                              composing it into a @c short value, and then increments the position by the size of @c short.
         * @see                 SetShort()
         */
@@ -776,12 +774,12 @@ public:
         * @since 2.0
         *
         * @return              An error code
-        * @param[in]   index           The index of the current %ByteBuffer instance, from which the bytes are read
-        * @param[out]  value           The @c short value at the given index
+        * @param[in]   index       The index of the current %ByteBuffer instance, from which the bytes are read
+        * @param[out]  value       The @c short value at the given index
         * @exception   E_SUCCESS                       The method is successful.
         * @exception   E_OUT_OF_RANGE          The specified index is outside the bounds of the data structure, or
         *                                                                      the @c index is larger than the limit minus size of @c short or less than @c 0.
-        * @remarks             This method reads the size of @c short number of bytes at the given index,
+        * @remarks     This method reads the size of @c short number of bytes at the given index,
         *                              composing it into a @c short value.
         * @see                 SetShort()
         */
@@ -799,8 +797,8 @@ public:
         *                                                      It must not be the calling %ByteBuffer instance.
         * @exception   E_SUCCESS               The method is successful.
         * @exception   E_INVALID_ARG   The specified input parameter is invalid.
-        *                                                              
-        * @remarks             After the copy operation, the current (destination) buffer's position and the given
+        *
+        * @remarks     After the copy operation, the current (destination) buffer's position and the given
         *                              (source) buffer's position are  incremented by the number of elements copied (the lesser of
         *                              the number of elements remaining in the current buffer and the given buffer). @n
         *                              If the remaining part of the current instance is greater than or equal to the remaining part of the input instance,
@@ -883,7 +881,7 @@ public:
         *                                                              the @c index or length is less than @c 0.
         * @exception   E_OVERFLOW              The operation (arithmetic/casting/conversion) has caused an overflow, or
         *                                                              the remaining bytes are smaller than @c length.
-        * @remarks             This method copies the specified number (@c length) of @c byte values into
+        * @remarks     This method copies the specified number (@c length) of @c byte values into
         *                              the calling object of buffer from the source array,
         *                              starting from the current position, and at the given index in the array.
         *                              After the copy operation, the position is incremented by @c length.
@@ -899,7 +897,7 @@ public:
         * @since 2.0
         *
         * @return              An error code
-        * @param[in]   value           The @c byte value to write to the current instance of %ByteBuffer
+        * @param[in]   value                   The @c byte value to write to the current instance of %ByteBuffer
         * @exception   E_SUCCESS               The method is successful.
         * @exception   E_OVERFLOW              The operation (arithmetic/casting/conversion) has caused an overflow, or
         *                                                              the current position is not smaller than the limit.
@@ -931,11 +929,11 @@ public:
         * @since 2.0
         *
         * @return              An error code
-        * @param[in]   value           The @c double value to write
+        * @param[in]   value                   The @c double value to write
         * @exception   E_SUCCESS               The method is successful.
         * @exception   E_OVERFLOW              The operation (arithmetic/casting/conversion) has caused an overflow, or
         *                                                              the remaining bytes of this buffer are smaller than the size of @c double.
-        * @remarks             This method writes the size of @c double number of bytes containing the given @c double value
+        * @remarks     This method writes the size of @c double number of bytes containing the given @c double value
         *                              into the calling buffer, at the current position, and then increments the position by the size of @c double.
         * @see                 GetDouble()
         */
@@ -949,11 +947,11 @@ public:
         * @since 2.0
         *
         * @return              An error code
-        * @param[in]   value           The @c float value to write
+        * @param[in]   value                   The @c float value to write
         * @exception   E_SUCCESS               The method is successful.
         * @exception   E_OVERFLOW              The operation (arithmetic/casting/conversion) has caused an overflow, or
         *                                                              the remaining bytes of this buffer are smaller than the size of @c float.
-        * @remarks             This method writes the size of @c float number of bytes containing the given @c float value
+        * @remarks     This method writes the size of @c float number of bytes containing the given @c float value
         *                              into this buffer at the current position, and then increments the position by the size of @c float.
         * @see                 GetFloat()
         */
@@ -967,11 +965,11 @@ public:
         * @since 2.0
         *
         * @return              An error code
-        * @param[in]   value   The @c int value to write
+        * @param[in]   value                   The @c int value to write
         * @exception   E_SUCCESS               The method is successful.
         * @exception   E_OVERFLOW              The operation (arithmetic/casting/conversion) has caused an overflow, or
         *                                                              the remaining bytes of this buffer are smaller than the size of @c int.
-        * @remarks             This method writes the size of @c int number of bytes containing the given @c int value
+        * @remarks     This method writes the size of @c int number of bytes containing the given @c int value
         *                              into this buffer at the current position, and then increments the position by the size of @c int.
         * @see                 GetInt()
         */
@@ -985,11 +983,11 @@ public:
         * @since 2.0
         *
         * @return              An error code
-        * @param[in]   value           The @c long value to write
+        * @param[in]   value                   The @c long value to write
         * @exception   E_SUCCESS               The method is successful.
         * @exception   E_OVERFLOW              The operation (arithmetic/casting/conversion) has caused an overflow, or
         *                                                              the remaining bytes of this buffer are smaller than size of @c long.
-        * @remarks             This method writes the size of @c long number of bytes containing the given @c long value
+        * @remarks     This method writes the size of @c long number of bytes containing the given @c long value
         *                              into this buffer at the current position, and then increments the position by the size of @c long.
         * @see                 GetLong()
         */
@@ -1003,11 +1001,11 @@ public:
         * @since 2.0
         *
         * @return              An error code
-        * @param[in]   value           The @c long @c long value to write
+        * @param[in]   value                   The @c long @c long value to write
         * @exception   E_SUCCESS               The method is successful.
         * @exception   E_OVERFLOW              The operation (arithmetic/casting/conversion) has caused an overflow, or
         *                                                              the remaining bytes of this buffer are smaller than the size of @c long @c long.
-        * @remarks             This method writes the size of @c long @c long number of bytes containing the given @c long @c long value
+        * @remarks     This method writes the size of @c long @c long number of bytes containing the given @c long @c long value
         *                              into this buffer at the current position, and then increments the position by the size of @c long @c long.
         * @see                 GetLongLong()
         */
@@ -1025,11 +1023,11 @@ public:
         * @since 2.0
         *
         * @return              An error code
-        * @param[in]   value           The @c wchar_t value to write
+        * @param[in]   value                   The @c wchar_t value to write
         * @exception   E_SUCCESS               The method is successful.
         * @exception   E_OVERFLOW              The operation (arithmetic/casting/conversion) has caused an overflow, or
         *                                                              the remaining bytes of this buffer are smaller than size of @c wchar_t.
-        * @remarks             This method writes the size of @c wchar_t number of bytes containing the given @c wchar_t value
+        * @remarks     This method writes the size of @c wchar_t number of bytes containing the given @c wchar_t value
         *                              into this buffer at the current position, and then increments the position by the size of @c wchar_t.
         * @see                 GetMchar()
         * @endif
@@ -1044,12 +1042,12 @@ public:
         * @since 2.0
         *
         * @return              An error code
-        * @param[in]   value                   The @c wchar_t value to write
-        * @exception   E_SUCCESS               The method is successful.
-        * @exception   E_OVERFLOW      The operation (arithmetic/casting/conversion) has caused an overflow, or
-        *                                                              the remaining bytes of this buffer are smaller than size of @c wchar_t.
-        * @remarks             This method writes the size of @c wchar_t number of bytes containing the given @c wchar_t value
-        *                              into this buffer at the current position, and then increments the position by the size of @c wchar_t.
+        * @param[in]   value           The @c wchar_t value to write
+        * @exception   E_SUCCESS               The method is successful.
+        * @exception   E_OVERFLOW      The operation (arithmetic/casting/conversion) has caused an overflow, or
+        *                                                              the remaining bytes of this buffer are smaller than size of @c wchar_t.
+        * @remarks     This method writes the size of @c wchar_t number of bytes containing the given @c wchar_t value
+        *                              into this buffer at the current position, and then increments the position by the size of @c wchar_t.
         * @see                 GetWchar()
         */
        result SetWchar(wchar_t value);
@@ -1062,11 +1060,11 @@ public:
         * @since 2.0
         *
         * @return              An error code
-        * @param[in]   value           The @c short value to write
+        * @param[in]   value                   The @c short value to write
         * @exception   E_SUCCESS               The method is successful.
         * @exception   E_OVERFLOW              The operation (arithmetic/casting/conversion) has caused an overflow, or
         *                                                              the remaining bytes of this buffer are smaller than the size of @c short.
-        * @remarks             This method writes the size of @c short number of bytes containing the given @c short value
+        * @remarks     This method writes the size of @c short number of bytes containing the given @c short value
         *                              into this buffer at the current position, and then increments the position by the size of @c short.
         * @see                 GetShort()
         */
@@ -1084,7 +1082,7 @@ public:
         * @exception   E_SUCCESS                       The method is successful.
         * @exception   E_OUT_OF_RANGE          The specified index is outside the bounds of the data structure, or
         *                                                                      the @c index is larger than the limit minus the size of @c double or less than @c 0.
-        * @remarks             This method writes the size of @c double number of bytes containing the given @c double value
+        * @remarks     This method writes the size of @c double number of bytes containing the given @c double value
         *                              into this buffer at the given index.
         * @see                 GetDouble()
         */
@@ -1102,7 +1100,7 @@ public:
         * @exception   E_SUCCESS                       The method is successful.
         * @exception   E_OUT_OF_RANGE          The specified index is outside the bounds of the data structure, or
         *                                                                      the @c index is larger than the limit minus the size of @c float or less than @c 0.
-        * @remarks             This method writes the size of @c float number of bytes containing the given @c float value
+        * @remarks     This method writes the size of @c float number of bytes containing the given @c float value
         *                              into this buffer at the given index.
         * @see                 GetFloat()
         */
@@ -1120,7 +1118,7 @@ public:
         * @exception   E_SUCCESS               The method is successful.
         * @exception   E_OUT_OF_RANGE          The specified index is outside the bounds of the data structure, or
         *                                                                      the @c index is larger than the limit minus size of @c int or less than @c 0.
-        * @remarks             This method writes the size of @c int number of bytes containing the given @c int value
+        * @remarks     This method writes the size of @c int number of bytes containing the given @c int value
         *                              into this buffer at the given index.
         * @see                 GetInt()
         */
@@ -1138,7 +1136,7 @@ public:
         * @exception   E_SUCCESS                       The method is successful.
         * @exception   E_OUT_OF_RANGE          The specified index is outside the bounds of the data structure, or
         *                                                                      the @c index is larger than the limit minus the size of @c long or less than @c 0.
-        * @remarks             This method writes size of @c long number of bytes containing the given @c long value
+        * @remarks     This method writes size of @c long number of bytes containing the given @c long value
         *                              into this buffer at the given index.
         * @see                 GetLong()
         */
@@ -1156,7 +1154,7 @@ public:
         * @exception   E_SUCCESS                       The method is successful.
         * @exception   E_OUT_OF_RANGE          The specified index is outside the bounds of the data structure, or
         *                                                                      the @c index is larger than the limit minus the size of @c long @c long or less than @c 0.
-        * @remarks             This method writes the size of @c long @c long number of bytes containing the given @c long @c long value
+        * @remarks     This method writes the size of @c long @c long number of bytes containing the given @c long @c long value
         *                              into this buffer at the given index.
         * @see                 GetLongLong()
         */
@@ -1178,7 +1176,7 @@ public:
         * @exception   E_SUCCESS                       The method is successful.
         * @exception   E_OUT_OF_RANGE          The specified index is outside the bounds of the data structure, or
         *                                                                      the @c index is larger than the limit minus the size of @c wchar_t or less than @c 0.
-        * @remarks             This method writes the size of @c wchar_t number of bytes containing the given @c wchar_t value
+        * @remarks     This method writes the size of @c wchar_t number of bytes containing the given @c wchar_t value
         *                              into this buffer at the given index.
         * @see                 GetMchar()
         * @endif
@@ -1192,13 +1190,13 @@ public:
         * @since 2.0
         *
         * @return              An error code
-        * @param[in]   index                   The index at which the bytes will be written
-        * @param[in]   value                   The @c wchar_t value to write
-        * @exception   E_SUCCESS                       The method is successful.
-        * @exception   E_OUT_OF_RANGE                  The specified index is outside the bounds of the data structure, or
-        *                                                                      the @c index is larger than the limit minus the size of @c wchar_t or less than @c 0.
-        * @remarks             This method writes the size of @c wchar_t number of bytes containing the given @c wchar_t value
-        *                              into this buffer at the given index.
+        * @param[in]   index           The index at which the bytes will be written
+        * @param[in]   value           The @c wchar_t value to write
+        * @exception   E_SUCCESS               The method is successful.
+        * @exception   E_OUT_OF_RANGE  The specified index is outside the bounds of the data structure, or
+        *                                                              the @c index is larger than the limit minus the size of @c wchar_t or less than @c 0.
+        * @remarks     This method writes the size of @c wchar_t number of bytes containing the given @c wchar_t value
+        *                              into this buffer at the given index.
         * @see                 GetWchar()
         */
        result SetWchar(int index, wchar_t value);
@@ -1215,7 +1213,7 @@ public:
         * @exception   E_SUCCESS                       The method is successful.
         * @exception   E_OUT_OF_RANGE          The specified index is outside the bounds of the data structure, or
         *                                                                      the @c index is larger than the limit minus the size of @c short or less than @c 0.
-        * @remarks             This method writes the size of @c short number of bytes containing the given @c short value
+        * @remarks     This method writes the size of @c short number of bytes containing the given @c short value
         *                              into this buffer at the given index.
         * @see                 GetShort()
         */
@@ -1228,7 +1226,7 @@ public:
         * @since 2.0
         *
         * @return              %ByteBuffer pointer to the current position of the calling object
-        * @remarks             The content of the new buffer starts at the current position of the calling %ByteBuffer object.
+        * @remarks     The content of the new buffer starts at the current position of the calling %ByteBuffer object.
         *                              The new buffer's position is zero, its capacity and limit are
         *                              the number of bytes remaining of the current instance of %ByteBuffer,
         *                              and its mark is undefined.
@@ -1246,6 +1244,16 @@ public:
        const byte* GetPointer(void) const;
 
        /**
+        * Gets the pointer to the raw array of the calling buffer. @n
+        * If the capacity is zero, it returns @c null.
+        *
+        * @since 2.1
+        *
+        * @return              A pointer(non-const) to the raw array of the calling buffer
+        */
+       byte* GetPointer(void);
+
+       /**
         * Compares the input Object with the calling %ByteBuffer instance.
         *
         * @since 2.0
@@ -1253,7 +1261,7 @@ public:
         * @return              @c true if the input object equals the calling %ByteBuffer instance, @n
         *                              else @c false
         * @param[in]   obj     The object instance to compare with the calling object
-        * @remarks             This method returns @c true only if the specified object is also an instance of
+        * @remarks     This method returns @c true only if the specified object is also an instance of
         *                              the %ByteBuffer class, the two buffers have the same number of remaining elements, and the two
         *                              sequences of remaining elements are equal (considered independent of their starting positions).
         * @see                 Tizen::Base::BufferBase::GetHashCode()
@@ -1266,7 +1274,7 @@ public:
         *      @since 2.0
         *
         *      @return         The hash value of the current instance
-        *      @remarks        The hash code of a buffer depends only upon its remaining elements.
+        *      @remarks                The hash code of a buffer depends only upon its remaining elements.
         */
        virtual int GetHashCode(void) const;
 
@@ -1275,7 +1283,7 @@ private:
         * This copy constructor is intentionally declared as private to prohibit copying of objects by users.
         */
        ByteBuffer(const ByteBuffer& buffer)
-               :__pByteBufferImpl(null)
+               : __pByteBufferImpl(null)
        {
                Construct(buffer);
        }
@@ -1294,7 +1302,7 @@ private:
 
 
        friend class _ByteBufferImpl;
-       class _ByteBufferImpl * __pByteBufferImpl;
+       class _ByteBufferImpl* __pByteBufferImpl;
 
 }; // ByteBuffer