mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-10-15 19:54:52 +08:00
more documentation and remove unused code
This commit is contained in:
@@ -3,6 +3,11 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
/// <inheritdoc />
|
||||
/// <summary>
|
||||
/// This exception will be thrown where the contents of the PDF document do not match the specification in such a way that it
|
||||
/// renders the document unreadable.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class PdfDocumentFormatException : Exception
|
||||
{
|
||||
@@ -13,6 +18,10 @@
|
||||
// http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncscol/html/csharp07192001.asp
|
||||
//
|
||||
|
||||
/// <inheritdoc />
|
||||
/// <summary>
|
||||
/// Create a new <see cref="T:UglyToad.Pdf.Exceptions.PdfDocumentFormatException" />.
|
||||
/// </summary>
|
||||
public PdfDocumentFormatException()
|
||||
{
|
||||
}
|
||||
|
@@ -48,20 +48,6 @@
|
||||
output.Write(HexBytes[GetLowNibble(b)]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the given byte array as hex value to the given output stream.
|
||||
* @param bytes the byte array to be written
|
||||
* @param output the output stream to be written to
|
||||
* @throws IOException exception if anything went wrong
|
||||
*/
|
||||
public static void WriteHexBytes(byte[] bytes, BinaryWriter output)
|
||||
{
|
||||
foreach (var b in bytes)
|
||||
{
|
||||
WriteHexByte(b, output);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* GetLongOrDefault the high nibble of the given byte.
|
||||
*
|
||||
|
@@ -1,20 +0,0 @@
|
||||
namespace UglyToad.Pdf.Util
|
||||
{
|
||||
internal class ParsePosition
|
||||
{
|
||||
public int Index { get; set; }
|
||||
|
||||
public int ErrorIndex { get; set; }
|
||||
|
||||
public ParsePosition(int index)
|
||||
{
|
||||
Index = index;
|
||||
ErrorIndex = -1;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{Index} (Error: {ErrorIndex})";
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user