public void oneShotAPI(File file, byte[] bytes) throws IOException
{
FileOutputStream fos = null;
try
{
fos = new FileOutputStream(file);
fos.write(bytes);
fos.flush();
} finally
{
if (fos != null)
try
{
fos.close();
} catch (IOException e)
{
// Sad, but true
}
}
}
Позвоните по номеру:
oneShotAPI(new File("myPDF.png"), byteArray);