Class ReadHelper
Helper methods for reading from PDF files.
public static class ReadHelper
- Inheritance
-
ReadHelper
- Inherited Members
Fields
AsciiCarriageReturn
The carriage return '\r' character.
public const byte AsciiCarriageReturn = 13
Field Value
AsciiLineFeed
The line-feed '\n' character.
public const byte AsciiLineFeed = 10
Field Value
Methods
IsCarriageReturn(byte)
Whether the character is a carriage return '\r' character.
public static bool IsCarriageReturn(byte c)
Parameters
c
byte
Returns
IsDigit(int)
Whether the given value is a digit or not.
public static bool IsDigit(int c)
Parameters
c
int
Returns
IsEndOfLine(byte)
Whether the character is an end of line character.
public static bool IsEndOfLine(byte b)
Parameters
b
byte
Returns
IsEndOfLine(char)
Whether the character is an end of line character.
public static bool IsEndOfLine(char c)
Parameters
c
char
Returns
IsEndOfName(int)
Whether the given character value is the end of a PDF Name token.
public static bool IsEndOfName(int ch)
Parameters
ch
int
Returns
IsHex(byte)
Whether the given character value is a valid hex value.
public static bool IsHex(byte b)
Parameters
b
byte
Returns
IsHex(char)
Whether the given character value is a valid hex value.
public static bool IsHex(char ch)
Parameters
ch
char
Returns
IsLineFeed(byte?)
Whether the character is an line feed '\n' character.
public static bool IsLineFeed(byte? c)
Parameters
c
byte?
Returns
IsSpace(int)
Whether the given character is a space.
public static bool IsSpace(int c)
Parameters
c
int
Returns
IsString(IInputBytes, string)
Whether the given string is at this position in the input. Resets to the current offset once read.
public static bool IsString(IInputBytes bytes, string s)
Parameters
bytes
IInputBytess
string
Returns
IsValidUtf8(byte[])
Whether the given input bytes are valid UTF8.
public static bool IsValidUtf8(byte[] input)
Parameters
input
byte[]
Returns
IsWhitespace(byte)
Determines if a character is whitespace or not, this includes newlines.
public static bool IsWhitespace(byte c)
Parameters
c
byte
Returns
Remarks
These values are specified in table 1 (page 12) of ISO 32000-1:2008.
ReadInt(IInputBytes)
Read an int from the input.
public static int ReadInt(IInputBytes bytes)
Parameters
bytes
IInputBytes
Returns
ReadLine(IInputBytes)
Read a string from the input until a newline.
public static string ReadLine(IInputBytes bytes)
Parameters
bytes
IInputBytes
Returns
ReadLong(IInputBytes)
Read a long from the input.
public static long ReadLong(IInputBytes bytes)
Parameters
bytes
IInputBytes
Returns
SkipSpaces(IInputBytes)
Skip any whitespace characters.
public static void SkipSpaces(IInputBytes bytes)
Parameters
bytes
IInputBytes