public class PatchManifest
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected static int |
STREAM_TRANSFER_BUFFER_SIZE |
| Constructor and Description |
|---|
PatchManifest() |
| Modifier and Type | Method and Description |
|---|---|
static void |
main(java.lang.String[] args) |
static byte[] |
readFileToBuffer(java.lang.String fileNameStr)
Reads data from a file into a buffer.
|
static byte[] |
readStreamToBuffer(java.io.InputStream stmObj)
Reads data from an input stream into a byte array.
|
static void |
transferStream(java.io.InputStream inputStreamObj,
java.io.OutputStream outputStreamObj)
Transfers data from the input stream to the output stream.
|
static void |
writeBufferToFile(java.lang.String fileNameStr,
byte[] btArr)
Writes a data buffer to a file.
|
public static void main(java.lang.String[] args)
public static byte[] readFileToBuffer(java.lang.String fileNameStr)
throws java.io.FileNotFoundException,
java.io.IOException
fileNameStr - the name of the input file.java.io.FileNotFoundException - if the specified file is not found.java.io.IOException - if an error occurred while opening or reading from
the input file.public static byte[] readStreamToBuffer(java.io.InputStream stmObj)
throws java.io.IOException
stmObj - the input stream to use.java.io.IOException - if an error occurred while reading from the
input stream.public static void transferStream(java.io.InputStream inputStreamObj,
java.io.OutputStream outputStreamObj)
throws java.io.IOException
inputStreamObj - the input stream.outputStreamObj - the output stream.java.io.IOException - if an I/O error occurs.public static void writeBufferToFile(java.lang.String fileNameStr,
byte[] btArr)
throws java.io.IOException
fileNameStr - the name of the output file.btArr - the data to be written.java.io.IOException - if an error occurred while opening or writing to
the output file.