@Test public void testSaveMediaDataToFile_stringArg() throws IOException { File outputFile = tempFolder.newFile(); Media.saveMediaDataToFile(TEST_DATA, outputFile.getPath()); FileInputStream inputStream = new FileInputStream(outputFile); byte[] actualBytes; try { actualBytes = ByteStreams.toByteArray(inputStream); } finally { inputStream.close(); } assertArrayEquals(TEST_DATA, actualBytes); }
public static void saveMediaDataToFile(byte[] mediaData, String fileName) throws FileNotFoundException, IOException { saveMediaDataToFile(mediaData, new File(fileName)); }
Media { public static void saveMediaDataToFile(byte[] mediaData, String fileName) throws FileNotFoundException, IOException { saveMediaDataToFile(mediaData, new File(fileName)); } }
Media { public static void saveMediaDataToFile(byte[] mediaData, String fileName) throws FileNotFoundException, IOException { saveMediaDataToFile(mediaData, new File(fileName)); } private  Media(); }
Media { public static void saveMediaDataToFile(byte[] mediaData, String fileName) throws FileNotFoundException, IOException { saveMediaDataToFile(mediaData, new File(fileName)); } private  Media(); static byte[] getMediaDataFromFile(String fileName); static byte[] getMediaDataFromFile(File file); static byte[] getMediaDataFromUrl(String url); static byte[] getMediaDataFromUrl(URL url); static void saveMediaDataToFile(byte[] mediaData, String fileName); static void saveMediaDataToFile(byte[] mediaData, File file); }
Media { public static void saveMediaDataToFile(byte[] mediaData, String fileName) throws FileNotFoundException, IOException { saveMediaDataToFile(mediaData, new File(fileName)); } private  Media(); static byte[] getMediaDataFromFile(String fileName); static byte[] getMediaDataFromFile(File file); static byte[] getMediaDataFromUrl(String url); static byte[] getMediaDataFromUrl(URL url); static void saveMediaDataToFile(byte[] mediaData, String fileName); static void saveMediaDataToFile(byte[] mediaData, File file);  }