@@ -580,7 +580,7 @@ public interface IByteBuffer : IReferenceCounted, IComparable<IByteBuffer>, IEqu
580580 /// non-writable and increases the <see cref="ReaderIndex" /> by the number of transferred bytes.
581581 /// </summary>
582582 /// <exception cref="IndexOutOfRangeException">
583- /// if <see cref="destination. WritableBytes" /> is greater than
583+ /// if <c>destination.< see cref="WritableBytes" /></c > is greater than
584584 /// <see cref="ReadableBytes" />.
585585 /// </exception>
586586 IByteBuffer ReadBytes ( IByteBuffer destination ) ;
@@ -629,6 +629,90 @@ public interface IByteBuffer : IReferenceCounted, IComparable<IByteBuffer>, IEqu
629629
630630 IByteBuffer WriteBytes ( byte [ ] src , int srcIndex , int length ) ;
631631
632+ /// <summary>
633+ /// Returns the maximum <see cref="ArraySegment{T}" /> of <see cref="Byte" /> that this buffer holds. Note that
634+ /// <see cref="GetIoBuffers()" />
635+ /// or <see cref="GetIoBuffers(int,int)" /> might return a less number of <see cref="ArraySegment{T}" />s of
636+ /// <see cref="Byte" />.
637+ /// </summary>
638+ /// <returns>
639+ /// <c>-1</c> if this buffer cannot represent its content as <see cref="ArraySegment{T}" /> of <see cref="Byte" />.
640+ /// the number of the underlying {@link ByteBuffer}s if this buffer has at least one underlying segment.
641+ /// Note that this method does not return <c>0</c> to avoid confusion.
642+ /// </returns>
643+ /// <seealso cref="GetIoBuffer()" />
644+ /// <seealso cref="GetIoBuffer(int,int)" />
645+ /// <seealso cref="GetIoBuffers()" />
646+ /// <seealso cref="GetIoBuffers(int,int)" />
647+ int IoBufferCount { get ; }
648+
649+ /// <summary>
650+ /// Exposes this buffer's readable bytes as an <see cref="ArraySegment{T}" /> of <see cref="Byte" />. Returned segment
651+ /// shares the content with this buffer. This method is identical
652+ /// to <c>buf.GetIoBuffer(buf.ReaderIndex, buf.ReadableBytes)</c>. This method does not
653+ /// modify <see cref="ReaderIndex" /> or <see cref="WriterIndex" /> of this buffer. Please note that the
654+ /// returned segment will not see the changes of this buffer if this buffer is a dynamic
655+ /// buffer and it adjusted its capacity.
656+ /// </summary>
657+ /// <exception cref="NotSupportedException">
658+ /// if this buffer cannot represent its content as <see cref="ArraySegment{T}" />
659+ /// of <see cref="Byte" />
660+ /// </exception>
661+ /// <seealso cref="IoBufferCount" />
662+ /// <seealso cref="GetIoBuffers()" />
663+ /// <seealso cref="GetIoBuffers(int,int)" />
664+ ArraySegment < byte > GetIoBuffer ( ) ;
665+
666+ /// <summary>
667+ /// Exposes this buffer's sub-region as an <see cref="ArraySegment{T}" /> of <see cref="Byte" />. Returned segment
668+ /// shares the content with this buffer. This method does not
669+ /// modify <see cref="ReaderIndex" /> or <see cref="WriterIndex" /> of this buffer. Please note that the
670+ /// returned segment will not see the changes of this buffer if this buffer is a dynamic
671+ /// buffer and it adjusted its capacity.
672+ /// </summary>
673+ /// <exception cref="NotSupportedException">
674+ /// if this buffer cannot represent its content as <see cref="ArraySegment{T}" />
675+ /// of <see cref="Byte" />
676+ /// </exception>
677+ /// <seealso cref="IoBufferCount" />
678+ /// <seealso cref="GetIoBuffers()" />
679+ /// <seealso cref="GetIoBuffers(int,int)" />
680+ ArraySegment < byte > GetIoBuffer ( int index , int length ) ;
681+
682+ /// <summary>
683+ /// Exposes this buffer's readable bytes as an array of <see cref="ArraySegment{T}" /> of <see cref="Byte" />. Returned
684+ /// segments
685+ /// share the content with this buffer. This method does not
686+ /// modify <see cref="ReaderIndex" /> or <see cref="WriterIndex" /> of this buffer. Please note that
687+ /// returned segments will not see the changes of this buffer if this buffer is a dynamic
688+ /// buffer and it adjusted its capacity.
689+ /// </summary>
690+ /// <exception cref="NotSupportedException">
691+ /// if this buffer cannot represent its content with <see cref="ArraySegment{T}" />
692+ /// of <see cref="Byte" />
693+ /// </exception>
694+ /// <seealso cref="IoBufferCount" />
695+ /// <seealso cref="GetIoBuffer()" />
696+ /// <seealso cref="GetIoBuffer(int,int)" />
697+ ArraySegment < byte > [ ] GetIoBuffers ( ) ;
698+
699+ /// <summary>
700+ /// Exposes this buffer's bytes as an array of <see cref="ArraySegment{T}" /> of <see cref="Byte" /> for the specified
701+ /// index and length.
702+ /// Returned segments share the content with this buffer. This method does
703+ /// not modify <see cref="ReaderIndex" /> or <see cref="WriterIndex" /> of this buffer. Please note that
704+ /// returned segments will not see the changes of this buffer if this buffer is a dynamic
705+ /// buffer and it adjusted its capacity.
706+ /// </summary>
707+ /// <exception cref="NotSupportedException">
708+ /// if this buffer cannot represent its content with <see cref="ArraySegment{T}" />
709+ /// of <see cref="Byte" />
710+ /// </exception>
711+ /// <seealso cref="IoBufferCount" />
712+ /// <seealso cref="GetIoBuffer()" />
713+ /// <seealso cref="GetIoBuffer(int,int)" />
714+ ArraySegment < byte > [ ] GetIoBuffers ( int index , int length ) ;
715+
632716 /// <summary>
633717 /// Flag that indicates if this <see cref="IByteBuffer" /> is backed by a byte array or not
634718 /// </summary>
0 commit comments