public static ReadBytes ( System.Stream stream ) : byte[] | ||
stream | System.Stream | |
Результат | byte[] |
public static void SkipBytes(Stream stream) { int num = (int)ProtocolParser.ReadUInt32(stream); if (!stream.CanSeek) { ProtocolParser.ReadBytes(stream); return; } stream.Seek((long)num, SeekOrigin.Current); }
public static string ReadString(Stream stream) { byte[] bytes = ProtocolParser.ReadBytes(stream); return(Encoding.UTF8.GetString(bytes, 0, bytes.Length)); }
public static byte[] ReadBytes(this Stream stream) { return(ProtocolParser.ReadBytes(stream)); }