more documentation and remove unused code

This commit is contained in:
Eliot Jones
2018-01-07 12:41:55 +00:00
parent bb93484909
commit 18eeb896e0
3 changed files with 9 additions and 34 deletions

View File

@@ -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()
{
}

View File

@@ -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.
*

View File

@@ -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})";
}
}
}