| com.atlassian.bitbucket.content.FileContentCallback |
Known Indirect Subclasses
|
A callback for the contents of a file
Note: Implementors are strongly encouraged to extend from AbstractFileContentCallback. This interface
will change, over time, and any class implementing it directly will be broken by such changes. Extending from
the abstract class will help prevent such breakages.
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
If annotations were requested and at least one
line was streamed, this
method will be called before onEnd(FileSummary) to provide blame for the streamed
lines. | |||||||||||
Called once if the file is binary.
| |||||||||||
Called once for each line in the file.
| |||||||||||
Called before the first
onLine(int, String, boolean). | |||||||||||
If annotations were requested and at least one line was streamed, this
method will be called before onEnd(FileSummary) to provide blame for the streamed
lines.
| blames | blame for the streamed lines |
|---|
| IOException | May be thrown by implementations which perform I/O. |
|---|
Called once if the file is binary. None of the other methods will be called.
| IOException | if the callback fails |
|---|
Called after the final line, and blame if
requested, has been streamed.
Note: If there were no lines, this method may be called immediately after onStart(FileContext) without
any calls to onLine(int, String, boolean).
| summary | summarizes the file request and the streamed lines |
|---|
| IOException | may be thrown by implementations which perform I/O. |
|---|
Called once for each line in the file. onStart(FileContext) is called before any invocation of this
method. onEnd(FileSummary) is called after all invocations of this method.
| lineNumber | the line number of the line in the file |
|---|---|
| line | a truncated line of code. The line character limit can be set at a system level via a system property |
| truncated | where the received line was truncated |
true if additional lines should be provided; otherwise, false if sufficient lines have
been processed| IOException | if the callback fails |
|---|
Called before the first onLine(int, String, boolean).
| context | provides details about the file request for which lines are being streamed |
|---|
| IOException | may be thrown by implementations which perform I/O. |
|---|