public interface IPrintDelegator
Modifier and Type | Method and Description |
---|---|
void |
getFileContents(java.nio.ByteBuffer byteBufferContent,
java.util.List<IFileSpec> fileSpecs,
GetFileContentsOptions opts)
Saves the value of a ByteBuffer onto the contents of one or more Perforce depot
file contents.
|
java.io.InputStream |
getFileContents(java.util.List<IFileSpec> fileSpecs,
boolean allRevs,
boolean noHeaderLine) |
java.io.InputStream |
getFileContents(java.util.List<IFileSpec> fileSpecs,
GetFileContentsOptions opts)
Return an InputStream onto the contents of one or more revisions of one or more Perforce depot
file contents.
|
java.io.InputStream getFileContents(java.util.List<IFileSpec> fileSpecs, boolean allRevs, boolean noHeaderLine) throws ConnectionException, RequestException, AccessException
java.io.InputStream getFileContents(java.util.List<IFileSpec> fileSpecs, GetFileContentsOptions opts) throws P4JavaException
If file is specified as a Perforce client workspace file name, the client view is used to find the corresponding depot file. If a file argument has a revision, then all files as of that revision are streamed. If a file argument has a revision range, then only files selected by that revision range are streamed, and the highest revision in the range is used for each file. Normally, only the head revision is printed.
The underlying input stream is not guaranteed to support mark() and skip() operations, and in some cases can be absolutely ginormously long it is also not guaranteed to be printable, and will be in the charset encoding stored in the Perforce server.
You should close the InputStreamReader after use in order to release any underlying stream-related resources. Failure to do this may lead to the proliferation of temp files or long-term memory wastage or even leaks.
Note that unlike the corresponding command-line command, which keeps going in the face of errors by moving on to the next file (or whatever), any errors encountered in this method will cause an exception from this method at the first error, so plan accordingly....
fileSpecs
- non-null list of depot or client file specs defining files to be streamedopts
- GetFileContentsOptions object describing optional parameters; if null, no
options are set.P4JavaException
- if any error occurs in the processing of this method.void getFileContents(java.nio.ByteBuffer byteBufferContent, java.util.List<IFileSpec> fileSpecs, GetFileContentsOptions opts) throws java.lang.Exception
If file is specified as a Perforce client workspace file name, the client view is used to find the corresponding depot file.
Note that unlike the corresponding command-line command, which keeps going in the face of errors by moving on to the next file (or whatever), any errors encountered in this method will cause an exception from this method at the first error, so plan accordingly....
byteBufferContent
- Fills with content of the fileSpecs into a ByteBufferfileSpecs
- non-null list of depot or client file specs defining files to be streamedopts
- GetFileContentsOptions object describing optional parameters; if null, no
options are set.P4JavaException
- if any error occurs in the processing of this method.java.lang.Exception