public class

ContentResolverAppearanceStreamGenerator

extends Object
implements Parcelable AppearanceStreamGenerator
java.lang.Object
   ↳ com.pspdfkit.annotations.appearance.ContentResolverAppearanceStreamGenerator

Class Overview

Annotation appearance stream generator that supplies a PDF file from a ContentProvider to be used as annotation appearance stream.

Summary

[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final Creator<ContentResolverAppearanceStreamGenerator> CREATOR
Public Constructors
ContentResolverAppearanceStreamGenerator(Uri uri)
Creates the appearance stream generator serving document at uri as an appearance stream.
Protected Constructors
ContentResolverAppearanceStreamGenerator(Parcel in)
Public Methods
int describeContents()
boolean equals(Object o)
DataProvider getDataProviderForAnnotation(Annotation annotation, EnumSet<AppearanceStreamGenerator.AppearanceStreamGenerationOptions> options)
Called when the appearance stream data for the given annotation is needed.
int hashCode()
boolean shouldUseGeneratorForAnnotation(Annotation annotation)
Asks the generator whether it should be used to generate the appearance stream for annotation.
void writeToParcel(Parcel dest, int flags)
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable
From interface com.pspdfkit.annotations.appearance.AppearanceStreamGenerator

Fields

public static final Creator<ContentResolverAppearanceStreamGenerator> CREATOR

Public Constructors

public ContentResolverAppearanceStreamGenerator (Uri uri)

Creates the appearance stream generator serving document at uri as an appearance stream.

Parameters
uri The Uri pointing to a document of a content provider. The uri has to use the content:// or file:// scheme.

Protected Constructors

protected ContentResolverAppearanceStreamGenerator (Parcel in)

Public Methods

public int describeContents ()

public boolean equals (Object o)

public DataProvider getDataProviderForAnnotation (Annotation annotation, EnumSet<AppearanceStreamGenerator.AppearanceStreamGenerationOptions> options)

Called when the appearance stream data for the given annotation is needed.

The data represented by the DataProvider must be a validly formed PDF. The contents of the first page of that PDF file will be embedded in the annotation as its appearance stream.

Parameters
annotation Annotation for which the AP stream is being generated.
options Enum set of AP stream generation options.
Returns
  • DataProvider representing a validly formed PDF or null to use annotation's default AP stream.

public int hashCode ()

public boolean shouldUseGeneratorForAnnotation (Annotation annotation)

Asks the generator whether it should be used to generate the appearance stream for annotation.

Parameters
annotation Annotation for which the AP stream is being generated.

public void writeToParcel (Parcel dest, int flags)