DataBufferRef | Android Developers

Quicknav Quicknav
Links

- Google Play Developer Console
- Android Developers Blog
- About Android

Android Sites

- Android.com
- Android Developers
- Android Open Source Project

Language
close

- - Get Started
  - Style
  - Patterns
  - Building Blocks
  - Downloads
  - Videos
- - Training
  - API Guides
  - Reference
  - Tools
    - Get the SDK
  - Google Services
- - Google Play
  - Publishing
  - Promoting
  - App Quality
  - Spotlight
  - Open Distribution

## Results

Loading...
Summary: Fields | Ctors | Methods | Protected Methods | Inherited Methods | [Expand All]
public abstract class

# DataBufferRef

extends Object

java.lang.Object
↳ | com.google.android.gms.common.data.DataBufferRef

## Class Overview

A `DataBufferRef` provides a pointer to a row in a `DataBuffer`. Note that if the underlying `DataBuffer` is closed, the reference will no longer be valid.

## Summary

Fields
protected final DataHolder | mDataHolder |
protected final int | mDataRow |

Public Constructors
| DataBufferRef(DataHolder holder, int dataRow)

Public Methods
boolean | equals(Object obj)
int | hashCode()

Protected Methods
void | copyToBuffer(String column, CharArrayBuffer dataOut) Copies the String content in the given column at the position of this reference into a `CharArrayBuffer`.
boolean | getBoolean(String column) Retrieves the boolean value for a given column at the position of this reference.
byte[] | getByteArray(String column) Retrieves the byte array value for a given column at the position of this reference.
int | getInteger(String column) Retrieves the integer value for a given column at the position of this reference.
long | getLong(String column) Retrieves the long value for a given column at the position of this reference.
String | getString(String column) Retrieves the String value for a given column at the position of this reference.
boolean | hasNull(String column) Returns whether the given column at the position of this reference contains null.
Uri | parseUri(String column) Retrieves the column data as a URI if possible, checking for null values.

[Expand] Inherited Methods
From class java.lang.Object
Object | clone()
boolean | equals(Object arg0)
void | finalize()
final Class<?> | getClass()
int | hashCode()
final void | notify()
final void | notifyAll()
String | toString()
final void | wait()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)

## Fields

#### protected final DataHolder mDataHolder

#### protected final int mDataRow

## Public Constructors

#### public DataBufferRef (DataHolder holder, int dataRow)

## Public Methods

#### public boolean equals (Object obj)

#### public int hashCode ()

## Protected Methods

#### protected void copyToBuffer (String column, CharArrayBuffer dataOut)

Copies the String content in the given column at the position of this reference into a `CharArrayBuffer`.

##### Parameters

column | The column to retrieve.
dataOut | The `CharArrayBuffer` to copy into.

##### Throws

IllegalArgumentException | if the column does not exist, the position is invalid, or the data holder has been closed.

#### protected boolean getBoolean (String column)

Retrieves the boolean value for a given column at the position of this reference.

##### Parameters

column | The column to retrieve.

##### Returns

- The boolean value in that column.

##### Throws

IllegalArgumentException | if the column does not exist, the position is invalid, or the data holder has been closed.

#### protected byte[] getByteArray (String column)

Retrieves the byte array value for a given column at the position of this reference.

##### Parameters

column | The column to retrieve.

##### Returns

- The byte array value in that column.

##### Throws

IllegalArgumentException | if the column does not exist, the position is invalid, or the data holder has been closed.

#### protected int getInteger (String column)

Retrieves the integer value for a given column at the position of this reference.

##### Parameters

column | The column to retrieve.

##### Returns

- The integer value in that column.

##### Throws

IllegalArgumentException | if the column does not exist, the position is invalid, or the data holder has been closed.

#### protected long getLong (String column)

Retrieves the long value for a given column at the position of this reference.

##### Parameters

column | The column to retrieve.

##### Returns

- The long value in that column.

##### Throws

IllegalArgumentException | if the column does not exist, the position is invalid, or the data holder has been closed.

#### protected String getString (String column)

Retrieves the String value for a given column at the position of this reference.

##### Parameters

column | The column to retrieve.

##### Returns

- The String value in that column.

##### Throws

IllegalArgumentException | if the column does not exist, the position is invalid, or the data holder has been closed.

#### protected boolean hasNull (String column)

Returns whether the given column at the position of this reference contains null.

##### Parameters

column | The column to check.

##### Returns

- Whether the column value is null at this position.

##### Throws

IllegalArgumentException | if the column does not exist, the position is invalid, or the data holder has been closed.

#### protected Uri parseUri (String column)

Retrieves the column data as a URI if possible, checking for null values. Will return null if the column contains null.

##### Parameters

column | The column to retrieve.

##### Returns

- The column data as a URI, or null if not present.

##### Throws

IllegalArgumentException | if the column does not exist, the position is invalid, or the data holder has been closed.