C# 클래스 GitSharp.Core.Diff.RawText

A sequence supporting UNIX formatted text in byte[] format. Elements of the sequence are the lines of the file, as delimited by the UNIX newline character ('\n'). The file content is treated as 8 bit binary text, with no assumptions or requirements on character encoding. Note that the first line of the file is element 0, as defined by the Sequence interface API. Traditionally in a text editor a patch file the first line is line number 1. Callers may need to subtract 1 prior to invoking methods if they are converting from "line number" to "element index".
상속: Sequence
파일 보기 프로젝트 열기: stschake/GitSharp 1 사용 예제들

공개 메소드들

메소드 설명
RawText ( byte input ) : System.IO

Create a new sequence from an existing content byte array. The entire array (indexes 0 through length-1) is used as the content.

equals ( int thisIdx, Sequence other, int otherIdx ) : bool
isMissingNewlineAtEnd ( ) : bool

Determine if the file ends with a LF ('\n').

size ( ) : int
writeLine ( Stream @out, int i ) : void

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.

비공개 메소드들

메소드 설명
HashLine ( byte raw, int ptr, int end ) : int

Compute a hash code for a single line.

computeHashes ( ) : IntList
equals ( RawText a, int ai, RawText b, int bi ) : bool

메소드 상세

RawText() 공개 메소드

Create a new sequence from an existing content byte array. The entire array (indexes 0 through length-1) is used as the content.
public RawText ( byte input ) : System.IO
input byte /// the content array. The array is never modified, so passing /// through cached arrays is safe. ///
리턴 System.IO

equals() 공개 메소드

public equals ( int thisIdx, Sequence other, int otherIdx ) : bool
thisIdx int
other Sequence
otherIdx int
리턴 bool

isMissingNewlineAtEnd() 공개 메소드

Determine if the file ends with a LF ('\n').
public isMissingNewlineAtEnd ( ) : bool
리턴 bool

size() 공개 메소드

public size ( ) : int
리턴 int

writeLine() 공개 메소드

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.
/// the stream write operation failed. ///
public writeLine ( Stream @out, int i ) : void
@out System.IO.Stream
i int /// Index of the line to extract. Note this is 0-based, so line /// number 1 is actually index 0.
리턴 void