public class Statics
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
chars
The characters which can be used to generate a random string
|
private static int |
PageWidth
The standard width of the page
|
Constructor and Description |
---|
Statics() |
Modifier and Type | Method and Description |
---|---|
static void |
clearData(android.app.Application app)
A function to clear the data of the current session.
|
private static void |
copy(java.io.File src,
java.io.File dst)
A function to copy files from one location to another.
|
static void |
createPdf(android.app.Application app,
java.lang.String name)
A function to create a PDF from all the Imaged captured in the current session.
|
static android.graphics.Bitmap |
doSharpen(android.content.Context ctx,
android.graphics.Bitmap original)
A function to sharpen the image
|
private static java.io.File |
getThumbnail(android.app.Application app)
A function to get the first image of the PDF to store it as a thumbnail.
|
static boolean |
isAvailable(java.lang.String name)
A function to check whether a PDF has already been created with the same name or not.
|
static java.lang.String |
randString()
A function to generate a random string
|
private static byte[] |
toByteArray(android.graphics.Bitmap image)
A function to get an array of bytes of the image so that the image can be added to the document.
|
private static final java.lang.String chars
private static final int PageWidth
public static void clearData(android.app.Application app)
app
- The application object for which the data is to be cleared.private static void copy(java.io.File src, java.io.File dst) throws java.io.IOException
src
- The source location of the file.dst
- The destination of the file.java.io.IOException
- Thrown if couldn't write to teh destination.public static void createPdf(android.app.Application app, java.lang.String name) throws java.io.IOException, com.itextpdf.text.DocumentException
app
- The application object to get the current session.name
- The name of the PDF to store as.java.io.IOException
- Thrown if the PDF could not be written and stored.com.itextpdf.text.DocumentException
- Thrown if the Document could not be created,public static android.graphics.Bitmap doSharpen(android.content.Context ctx, android.graphics.Bitmap original)
ctx
- the app contextoriginal
- the bitmap to sharpenprivate static java.io.File getThumbnail(android.app.Application app)
app
- The application object to get the current session.public static boolean isAvailable(java.lang.String name)
name
- the name to check of existence ofpublic static java.lang.String randString()
private static byte[] toByteArray(android.graphics.Bitmap image)
image
- The image to be decoded into byte array.