public interface

UploadData

com.google.gdata.client.uploader.UploadData
Known Indirect Subclasses

Class Overview

A seekable, read-only buffer of data to be upload uploading.

Summary

Public Methods
abstract long length()
Returns the total number of bytes of data in the buffer.
abstract void read(byte[] destination)
Reads up to destination.length bytes from the current position into the destination buffer.
abstract int read(byte[] chunk, int i, int length)
Reads up to length bytes into the chunk buffer.
abstract void setPosition(long position)
Sets the offset from the start of the the source data from which the next read will begin.

Public Methods

public abstract long length ()

Returns the total number of bytes of data in the buffer.

public abstract void read (byte[] destination)

Reads up to destination.length bytes from the current position into the destination buffer.

Parameters
destination
Throws
IOException if the data could not be read.

public abstract int read (byte[] chunk, int i, int length)

Reads up to length bytes into the chunk buffer.

Parameters
chunk
i The start offset in the destination buffer.
length
Throws
IOException if the data could not be read.

public abstract void setPosition (long position)

Sets the offset from the start of the the source data from which the next read will begin.

Parameters
position
Throws
IOException if position is negative or past the end of the data.