{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}
public final class FileTestStorage implements PlatformTestStorage
A class that reads/writes the runner data using the raw file system.
This API is experimental and is subject to change or removal in future releases.
Public constructors |
|
|---|---|
Public methods |
|
|---|---|
void |
addOutputProperties(Map<String, Serializable> properties)Test output properties is not supported when raw file I/O is used. |
String |
getInputArg(String argName)Test input arguments is not supported when raw file I/O is used. |
Map<String, String> |
Test input arguments is not supported when raw file I/O is used. |
Map<String, Serializable> |
Test output properties is not supported when raw file I/O is used. |
InputStream |
openInputFile(String pathname)Provides an InputStream to a test file dependency. |
InputStream |
openInternalInputFile(String pathname)Provides an InputStream to an internal file used by the testing infrastructure. |
OutputStream |
openInternalOutputFile(String pathname)Provides an OutputStream to an internal file used by the testing infrastructure. |
OutputStream |
openOutputFile(String pathname)Provides an OutputStream to a test output file. |
OutputStream |
openOutputFile(String pathname, boolean append)Provides an OutputStream to a test output file. |
public void addOutputProperties(Map<String, Serializable> properties)
Test output properties is not supported when raw file I/O is used.
public String getInputArg(String argName)
Test input arguments is not supported when raw file I/O is used.
null is always returned.
public Map<String, String> getInputArgs()
Test input arguments is not supported when raw file I/O is used.
An empty map is always returned.
public Map<String, Serializable> getOutputProperties()
Test output properties is not supported when raw file I/O is used.
An empty map is always returned.
public InputStream openInputFile(String pathname)
Provides an InputStream to a test file dependency.
| Parameters | |
|---|---|
String pathname |
path to the test file dependency. Should not be null. This is an absolute file path on the device, and it's the infrastructure/client's responsibility to make sure the file path is readable. |
| Throws | |
|---|---|
java.io.IOException java.io.IOException |
|
public InputStream openInternalInputFile(String pathname)
Provides an InputStream to an internal file used by the testing infrastructure.
| Parameters | |
|---|---|
String pathname |
path to the internal input file. Should not be null. This is an absolute file path on the device, and it's the infrastructure/client's responsibility to make sure the file path is readable. |
| Throws | |
|---|---|
java.io.IOException java.io.IOException |
|
public OutputStream openInternalOutputFile(String pathname)
Provides an OutputStream to an internal file used by the testing infrastructure.
| Parameters | |
|---|---|
String pathname |
path to the internal output file. Should not be null. This is an absolute file path on the device, and it's the infrastructure/client's responsibility to make sure the file path is writable. |
| Throws | |
|---|---|
java.io.IOException java.io.IOException |
|
public OutputStream openOutputFile(String pathname)
Provides an OutputStream to a test output file.
| Parameters | |
|---|---|
String pathname |
path to the test file dependency. Should not be null. This is an absolute file path on the device, and it's the infrastructure/client's responsibility to make sure the file path is writable. |
| Throws | |
|---|---|
java.io.IOException java.io.IOException |
|
public OutputStream openOutputFile(String pathname, boolean append)
Provides an OutputStream to a test output file.
| Parameters | |
|---|---|
String pathname |
path to the test output file. Should not be null. |
boolean append |
if true, then the lines will be added to the end of the file rather than overwriting. |
| Returns | |
|---|---|
OutputStream |
an OutputStream to the given output file. |
| Throws | |
|---|---|
java.io.IOException java.io.IOException |
|