{% 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 |
|
|---|---|
@NonNull void |
addOutputProperties(Test output properties is not supported when raw file I/O is used. |
@NonNull String |
getInputArg(@NonNull String argName)Test input arguments is not supported when raw file I/O is used. |
@NonNull Map<@NonNull String, @NonNull String> |
Test input arguments is not supported when raw file I/O is used. |
@NonNull Map<@NonNull String, @NonNull Serializable> |
Test output properties is not supported when raw file I/O is used. |
@NonNull InputStream |
openInputFile(@NonNull String pathname)Provides an InputStream to a test file dependency. |
@NonNull InputStream |
openInternalInputFile(@NonNull String pathname)Provides an InputStream to an internal file used by the testing infrastructure. |
@NonNull OutputStream |
openInternalOutputFile(@NonNull String pathname)Provides an OutputStream to an internal file used by the testing infrastructure. |
@NonNull OutputStream |
openOutputFile(@NonNull String pathname)Provides an OutputStream to a test output file. |
@NonNull OutputStream |
openOutputFile(@NonNull String pathname, @NonNull boolean append)Provides an OutputStream to a test output file. |
@NonNull
public void addOutputProperties(
@NonNull Map<@NonNull String, @NonNull Serializable> properties
)
Test output properties is not supported when raw file I/O is used.
@NonNull
public String getInputArg(@NonNull String argName)
Test input arguments is not supported when raw file I/O is used.
null is always returned.
@NonNull
public Map<@NonNull String, @NonNull String> getInputArgs()
Test input arguments is not supported when raw file I/O is used.
An empty map is always returned.
@NonNull
public Map<@NonNull String, @NonNull Serializable> getOutputProperties()
Test output properties is not supported when raw file I/O is used.
An empty map is always returned.
@NonNull
public InputStream openInputFile(@NonNull String pathname)
Provides an InputStream to a test file dependency.
@NonNull
public InputStream openInternalInputFile(@NonNull String pathname)
Provides an InputStream to an internal file used by the testing infrastructure.
@NonNull
public OutputStream openInternalOutputFile(@NonNull String pathname)
Provides an OutputStream to an internal file used by the testing infrastructure.
@NonNull
public OutputStream openOutputFile(@NonNull String pathname)
Provides an OutputStream to a test output file.
@NonNull
public OutputStream openOutputFile(@NonNull String pathname, @NonNull boolean append)
Provides an OutputStream to a test output file.
| Parameters | |
|---|---|
@NonNull String pathname |
path to the test output file. Should not be null. |
@NonNull 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. |