public class ScreenCapture extends Object
ScreenCapture capture = ScreenCapture.of(new Dimension(100, 200));
try {
System.out.println(capture.getMD5());
} catch (IOException e) {
e.printStackTrace();
}
of(),
of(java.awt.Dimension)| Constructor and Description |
|---|
ScreenCapture(Dimension dimensions) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getData()
Get the a byte array of the raw data of this screen capture.
|
String |
getMd5()
Get the MD5 hash sum of the byte array of the data of the screen capture.
|
static ScreenCapture |
of()
Takes a screen capture of the full screen.
|
static ScreenCapture |
of(Dimension dimensions)
Takes a screen capture of the given dimensions.
|
void |
take()
Takes the screen capture of the designated area.
|
public ScreenCapture(Dimension dimensions)
public void take()
throws AWTException
AWTExceptionpublic String getMd5() throws IOException
IOException - if an I/O exception occurspublic byte[] getData()
public static ScreenCapture of() throws IOException
IOException - if an I/O exception occurspublic static ScreenCapture of(Dimension dimensions) throws IOException
dimensions - the dimensions of which to take a screen captureIOException - if an I/O exception occursCopyright © 2012. All Rights Reserved.