Class Content
Reads the contents of files and streams.
public class Content
- Inheritance
-
Content
- Inherited Members
Methods
GetFromStream(Stream)
public static byte[] GetFromStream(Stream stream)
Parameters
streamStream
Returns
- byte[]
GetFromStream(Stream, int)
Returns all the bytes read from the stream, reading bufferSize bytes at a time.
public static byte[] GetFromStream(Stream stream, int bufferSize)
Parameters
Returns
- byte[]
LinesOfTextFile(string)
Returns all the bytes read from the stream.
public static List<string> LinesOfTextFile(string fileName)
Parameters
fileNamestring
Returns
OfBinaryFile(string)
Returns the contents of the specified file as bytes.
public static byte[] OfBinaryFile(string fileName)
Parameters
fileNamestring
Returns
- byte[]
OfTextFile(string)
Returns the contents of the specified text file, which is read as UTF-8.
public static string OfTextFile(string fileName)
Parameters
fileNamestring