Stay organized with collections Save and categorize content based on your preferences.

ScreenCapture

public final class ScreenCapture


A ScreenCapture contains a bitmap of a device screen along with a set of ScreenCaptureProcessors that will be used to process the ScreenCapture when process is called.

If no ScreenCaptureProcessors are added to the list the BasicScreenCaptureProcessor is used when process is called.

If a set of processors are supplied with the call to process then those processors will take precedence over the set of global processors and the BasicScreenCaptureProcessor.

Summary

Public constructors

Public methods

boolean
Bitmap

Returns the Bitmap that was set when the ScreenCapture was created.

CompressFormat

Returns the format to save the bitmap as or PNG if none has been set.

String

Returns the filename to save the bitmap as or null if none has been set.

int
void

Process the ScreenCapture using the global set of ScreenCaptureProcessors or the BasicScreenCaptureProcessor if no processors are set.

void

Process the ScreenCapture using the given set of ScreenCaptureProcessors or the BasicScreenCaptureProcessor if no processors are in the given set.

ScreenCapture
setFormat(CompressFormat format)

Sets the format to save the ScreenCapture as.

ScreenCapture
setName(String filename)

Sets the filename to save the ScreenCapture as.

Public constructors

ScreenCapture

public ScreenCapture()

Public methods

equals

public boolean equals(Object obj)

getBitmap

public Bitmap getBitmap()

Returns the Bitmap that was set when the ScreenCapture was created.

getFormat

public CompressFormat getFormat()

Returns the format to save the bitmap as or PNG if none has been set.

getName

public String getName()

Returns the filename to save the bitmap as or null if none has been set.

hashCode

public int hashCode()

process

public void process()

Process the ScreenCapture using the global set of ScreenCaptureProcessors or the BasicScreenCaptureProcessor if no processors are set.

Throws
java.io.IOException java.io.IOException

if there is an IOException while any of the processors are processing the ScreenCapture

process

public void process(Set<ScreenCaptureProcessor> processorSet)

Process the ScreenCapture using the given set of ScreenCaptureProcessors or the BasicScreenCaptureProcessor if no processors are in the given set.

Parameters
Set<ScreenCaptureProcessor> processorSet

the set of processors to use to process the ScreenCapture

Throws
java.io.IOException java.io.IOException

if there is an IOException while any of the processors are processing the ScreenCapture

setFormat

public ScreenCapture setFormat(CompressFormat format)

Sets the format to save the ScreenCapture as.

Parameters
CompressFormat format

the format to use to save the screenshot as

Returns
ScreenCapture

a fluent interface

setName

public ScreenCapture setName(String filename)

Sets the filename to save the ScreenCapture as.

Parameters
String filename

the filename to use to save the capture as

Returns
ScreenCapture

a fluent interface