Skip to content

Commit

Permalink
[jni] Clarify JBuffer.array docs (#1925)
Browse files Browse the repository at this point in the history
  • Loading branch information
HosseinYousefi authored Jan 22, 2025
1 parent 4282a79 commit 42298b2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkgs/jni/lib/src/nio/jbuffer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,15 @@ class JBuffer extends JObject {

/// The array that backs this buffer.
///
/// Note that the first element of the buffer starts at element [arrayOffset]
/// of the backing array.
///
/// Concrete subclasses like [JByteBuffer] provide more strongly-typed return
/// values for this method.
///
/// Invoke the [hasArray] method before invoking this method in order to
/// ensure that this buffer has an accessible backing array.
///
/// Throws:
/// * `ReadOnlyBufferException` - If this buffer is backed by an array but is
/// read-only
Expand All @@ -263,6 +269,9 @@ class JBuffer extends JObject {
/// The offset within this buffer's backing array of the first element
/// of the buffer.
///
/// Invoke the [hasArray] method before invoking this method in order to
/// ensure that this buffer has an accessible backing array.
///
/// Throws:
/// * `ReadOnlyBufferException` - If this buffer is backed by an array but is
/// read-only
Expand Down

0 comments on commit 42298b2

Please sign in to comment.