Creates a {@link DocumentDescriptor}.
this.name = name;
this.path = path;
this.stream = stream;
try
{
size = stream.available();
if (stream.markSupported())
{
stream.mark(nrOfBytes);
final byte[] b = new byte[nrOfBytes];
final int read = stream.read(b, 0, Math.min(size, b.length));
bytes = new byte[read];
System.arraycopy(b, 0, bytes, 0, read);
stream.reset();
}
}
catch (IOException ex)
{
System.out.println(ex);
}