Свойство | Type | Description | |
---|---|---|---|
EMPTY_TEXT |
Свойство | Type | Description | |
---|---|---|---|
content | byte[] | ||
lines | NGit.Util.IntList |
Méthode | Description | |
---|---|---|
GetLineDelimiter ( ) : string |
Get the line delimiter for the first line. Get the line delimiter for the first line. |
|
GetString ( int i ) : string |
Get the text for a single line. Get the text for a single line. |
|
GetString ( int begin, int end, bool dropLF ) : string |
Get the text for a region of lines. Get the text for a region of lines. |
|
IsBinary ( |
Determine heuristically whether the bytes contained in a stream represents binary (as opposed to text) content. Determine heuristically whether the bytes contained in a stream represents binary (as opposed to text) content. Note: Do not further use this stream after having called this method! The stream may not be fully read and will be left at an unknown position after consuming an unknown number of bytes. The caller is responsible for closing the stream. |
|
IsBinary ( byte raw ) : bool |
Determine heuristically whether a byte array represents binary (as opposed to text) content. Determine heuristically whether a byte array represents binary (as opposed to text) content. |
|
IsBinary ( byte raw, int length ) : bool |
Determine heuristically whether a byte array represents binary (as opposed to text) content. Determine heuristically whether a byte array represents binary (as opposed to text) content. |
|
IsMissingNewlineAtEnd ( ) : bool |
Determine if the file ends with a LF ('\n'). Determine if the file ends with a LF ('\n'). |
|
RawText ( |
Create a new sequence from a file. Create a new sequence from a file. The entire file contents are used. |
|
RawText ( byte input ) : NGit.Diff |
Create a new sequence from an existing content byte array. Create a new sequence from an existing content byte array. The entire array (indexes 0 through length-1) is used as the content. |
|
Size ( ) : int | ||
WriteLine ( |
Write a specific line to the output stream, without its trailing LF. Write a specific line to the output stream, without its trailing LF. The specified line is copied as-is, with no character encoding translation performed. If the specified line ends with an LF ('\n'), the LF is not copied. It is up to the caller to write the LF, if desired, between output lines. |
Méthode | Description | |
---|---|---|
Decode ( int start, int end ) : string |
Decode a region of the text into a String. Decode a region of the text into a String. The default implementation of this method tries to guess the character set by considering UTF-8, the platform default, and falling back on ISO-8859-1 if neither of those can correctly decode the region given. |
Méthode | Description | |
---|---|---|
GetEnd ( int i ) : int | ||
GetStart ( int i ) : int |
protected Decode ( int start, int end ) : string | ||
start | int | first byte of the content to decode. |
end | int | one past the last byte of the content to decode. |
Résultat | string |
public GetString ( int i ) : string | ||
i | int | /// index of the line to extract. Note this is 0-based, so line /// number 1 is actually index 0. /// |
Résultat | string |
public GetString ( int begin, int end, bool dropLF ) : string | ||
begin | int | /// index of the first line to extract. Note this is 0-based, so /// line number 1 is actually index 0. /// |
end | int | index of one past the last line to extract. |
dropLF | bool | /// if true the trailing CRLF or LF ('\n' or '\r\n') of the last returned line is /// dropped, if present. /// |
Résultat | string |
public static IsBinary ( |
||
raw | input stream containing the raw file content. | |
Résultat | bool |
public static IsBinary ( byte raw ) : bool | ||
raw | byte | the raw file content. |
Résultat | bool |
public static IsBinary ( byte raw, int length ) : bool | ||
raw | byte | the raw file content. |
length | int |
/// number of bytes in
/// raw
/// to evaluate. This should be
/// raw.length
/// unless
/// raw
/// was over-allocated by
/// the caller.
/// |
Résultat | bool |
public RawText ( |
||
file | the text file. | |
Résultat | NGit.Diff |
public RawText ( byte input ) : NGit.Diff | ||
input | byte | /// the content array. The array is never modified, so passing /// through cached arrays is safe. /// |
Résultat | NGit.Diff |
public WriteLine ( |
||
@out | ||
i | int | /// index of the line to extract. Note this is 0-based, so line /// number 1 is actually index 0. /// |
Résultat | void |