ReadBytes() public method

public ReadBytes ( int numberOfBytes ) : byte[]
numberOfBytes int
return byte[]
示例#1
0
        public void Load(GitObjectStream content)
        {
            Created = new IndexTime();
            Created.Load(content);

            Modified = new IndexTime();
            Modified.Load(content);

            var dev = content.ReadBytes(4);
            var ino = content.ReadBytes(4);
            var mode = content.ReadBytes(4);
            var uid = content.ReadBytes(4);
            var gid = content.ReadBytes(4);
            var size = content.ReadBytes(4);
            Signature = content.ReadBytes(20).ToHexString();
            var flags = content.ReadBytes(2);

            Name = content.ReadToNull().ToAsciiString();

            content.ReadToNextNonNull();
        }
示例#2
0
        public void Load(GitObjectStream content)
        {
            var signatureBytes = content.ReadBytes(SignatureSize);
            var versionBytes = content.ReadBytes(VersionSize);
            var entriesBytes = content.ReadBytes(EntriesSize);

            Signature = signatureBytes.ToAsciiString();
            Version = versionBytes.ToInt32();
            Entries = entriesBytes.ToInt32();
        }