FileDocCategorySizeDatePackage
PrinterException.javaAPI DocExample1412Thu Nov 08 00:23:44 GMT 2001com.ora.rmibook.chapter3

PrinterException

public class PrinterException extends Exception

Fields Summary
private int
_numberOfPagesPrinted
private String
_humanReadableErrorDescription
Constructors Summary
public PrinterException(InputStream inputStream)

        DataInputStream dataInputStream = new DataInputStream(inputStream);

        _humanReadableErrorDescription = dataInputStream.readUTF();
        _numberOfPagesPrinted = dataInputStream.readInt();
    
public PrinterException(int numberOfPagesPrinted, String humanReadableErrorDescription)

        _numberOfPagesPrinted = numberOfPagesPrinted;
        _humanReadableErrorDescription = humanReadableErrorDescription;
    
Methods Summary
public java.lang.StringgetHumanReadableErrorDescription()

        return _humanReadableErrorDescription;
    
public intgetNumberOfPagesPrinted()

        return _numberOfPagesPrinted;
    
public voidwriteToStream(java.io.OutputStream outputStream)

        DataOutputStream dataOutputStream = new DataOutputStream(outputStream);

        writeToStream(dataOutputStream);
    
public voidwriteToStream(java.io.DataOutputStream dataOutputStream)

        dataOutputStream.writeUTF(_humanReadableErrorDescription);
        dataOutputStream.writeInt(_numberOfPagesPrinted);