Quicknav Quicknav
Links

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

Android Sites

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

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: Methods | Inherited Methods | [Expand All]
public final class

# DataBufferUtils

extends Object

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

## Class Overview

Utilities for working with `DataBuffer` objects.

## Summary

Public Methods
static <T, E extends Freezable<T>> ArrayList<T> | freezeAndClose(DataBuffer<E> buffer) Utility helper method to freeze a DataBuffer into a list of concrete entities.
static boolean | hasNextPage(DataBuffer<?> buffer) Utility function to get the "next page" pagination token from a data buffer.
static boolean | hasPrevPage(DataBuffer<?> buffer) Utility function to get the "prev page" pagination token from a data buffer.

[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)

## Public Methods

#### public static ArrayList<T> freezeAndClose (DataBuffer<E> buffer)

Utility helper method to freeze a DataBuffer into a list of concrete entities. The DataBuffer provided here must contain elements that implement the `Freezable` interface.

Note that this will close the buffer, so do not attempt to use it afterwards.

Type T is the type of object returned by freezing an element of the DataBuffer. In most cases, this will be the same as `E`.

Type E is the type of object contained by the DataBuffer. Must implement `Freezable`.

##### Parameters

buffer | `DataBuffer` to freeze contents from.

##### Returns

- ArrayList of objects represented by the buffer.

#### public static boolean hasNextPage (DataBuffer<?> buffer)

Utility function to get the "next page" pagination token from a data buffer.

#### public static boolean hasPrevPage (DataBuffer<?> buffer)

Utility function to get the "prev page" pagination token from a data buffer.