Commit 001d3468 by sheenachhabra Committed by Rohit Singh

Remove cache term from TestUtil methods

PiperOrigin-RevId: 523675327
parent cd16da03
...@@ -190,9 +190,9 @@ public class TestUtil { ...@@ -190,9 +190,9 @@ public class TestUtil {
return Util.toByteArray(getInputStream(context, fileName)); return Util.toByteArray(getInputStream(context, fileName));
} }
/** Returns the bytes of a cache file using its file path. */ /** Returns the bytes of a file using its file path. */
public static byte[] getByteArrayFromCache(String cacheFilePath) throws IOException { public static byte[] getByteArrayFromFilePath(String filePath) throws IOException {
InputStream inputStream = new FileInputStream(cacheFilePath); InputStream inputStream = new FileInputStream(filePath);
return Util.toByteArray(inputStream); return Util.toByteArray(inputStream);
} }
...@@ -400,7 +400,7 @@ public class TestUtil { ...@@ -400,7 +400,7 @@ public class TestUtil {
/** /**
* Extracts all samples from the given file into a {@link FakeTrackOutput}. * Extracts all samples from the given file into a {@link FakeTrackOutput}.
* *
* @param extractor The {@link Extractor} to extractor from input. * @param extractor The {@link Extractor} to be used.
* @param context A {@link Context}. * @param context A {@link Context}.
* @param fileName The name of the input file. * @param fileName The name of the input file.
* @return The {@link FakeTrackOutput} containing the extracted samples. * @return The {@link FakeTrackOutput} containing the extracted samples.
...@@ -414,17 +414,17 @@ public class TestUtil { ...@@ -414,17 +414,17 @@ public class TestUtil {
} }
/** /**
* Extracts all samples from the given storage file into a {@link FakeTrackOutput}. * Extracts all samples from the given file into a {@link FakeTrackOutput}.
* *
* @param extractor The {@link Extractor} to extractor from input. * @param extractor The {@link Extractor} to be used.
* @param cacheFilePath The cache file path. * @param filePath The file path.
* @return The {@link FakeTrackOutput} containing the extracted samples. * @return The {@link FakeTrackOutput} containing the extracted samples.
* @throws IOException If an error occurred reading from the input, or if the extractor finishes * @throws IOException If an error occurred reading from the input, or if the extractor finishes
* reading from input without extracting any {@link SeekMap}. * reading from input without extracting any {@link SeekMap}.
*/ */
public static FakeExtractorOutput extractAllSamplesFromCacheFile( public static FakeExtractorOutput extractAllSamplesFromFilePath(
Extractor extractor, String cacheFilePath) throws IOException { Extractor extractor, String filePath) throws IOException {
byte[] data = TestUtil.getByteArrayFromCache(cacheFilePath); byte[] data = getByteArrayFromFilePath(filePath);
return extractAllSamplesFromByteArray(extractor, data); return extractAllSamplesFromByteArray(extractor, data);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment