Class Goldenfile
java.lang.Object
com.sun.ts.tests.common.webclient.Goldenfile
A representation of a Goldenfile that may be used by a particular test case.
- 
Constructor SummaryConstructorsConstructorDescriptionGoldenfile(String path, String encoding) Creates a new GoldenFile based on the fully qualified filename provided.
- 
Method SummaryModifier 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.longReturns the length of the Goldenfile.
- 
Constructor Details- 
GoldenfileCreates a new GoldenFile based on the fully qualified filename provided.- Parameters:
- path- Fully qualified file name
- encoding- to use when reading the goldenfile
 
 
- 
- 
Method Details- 
getLengthpublic long getLength()Returns the length of the Goldenfile.- Returns:
- long length
 
- 
getGoldenFileAsBytesReturns 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.
 
- 
getGoldenFileAsStringRetuns 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.
 
- 
getGoldenFileAsStreamReturns 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.
 
 
-