Class Goldenfile
java.lang.Object
ee.jakarta.tck.ws.rs.common.webclient.Goldenfile
A representation of a Goldenfile that may be used by a particular test case.
-
Constructor Summary
ConstructorsConstructorDescriptionGoldenfile
(String path, String encoding) Creates a new GoldenFile based on the fully qualified filename provided. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
Returns the byte content of the specified goldenfile using the charset encoding specified in the response from the server.Returns the goldenfile as an InputStream using the charset encoding specified in the response from the server.Retuns a string representation of the specified goldenfile using the charset encoding specified in the response from the server.long
Returns the length of the Goldenfile.
-
Constructor Details
-
Goldenfile
Creates a new GoldenFile based on the fully qualified filename provided.- Parameters:
path
- Fully qualified file nameencoding
- to use when reading the goldenfile
-
-
Method Details
-
getLength
public long getLength()Returns the length of the Goldenfile.- Returns:
- long length
-
getGoldenFileAsBytes
Returns the byte content of the specified goldenfile using the charset encoding specified in the response from the server.- Returns:
- the goldenfile as a byte array
- Throws:
IOException
- if an error occurs processing the file.
-
getGoldenFileAsString
Retuns a string representation of the specified goldenfile using the charset encoding specified in the response from the server.- Returns:
- the goldenfile as a String.
- Throws:
IOException
- if an error occurs processing the file.
-
getGoldenFileAsStream
Returns the goldenfile as an InputStream using the charset encoding specified in the response from the server.- Returns:
- goldenfile as an InputStream
- Throws:
IOException
- If an error occurs processing the file.
-