FileDocCategorySizeDatePackage
NbtException.javaAPI DocJCIFS 1.3.17 API4104Tue Oct 18 15:26:24 BST 2011jcifs.netbios

NbtException

public class NbtException extends IOException

Fields Summary
public static final int
SUCCESS
public static final int
ERR_NAM_SRVC
public static final int
ERR_SSN_SRVC
public static final int
FMT_ERR
public static final int
SRV_ERR
public static final int
IMP_ERR
public static final int
RFS_ERR
public static final int
ACT_ERR
public static final int
CFT_ERR
public static final int
CONNECTION_REFUSED
public static final int
NOT_LISTENING_CALLED
public static final int
NOT_LISTENING_CALLING
public static final int
CALLED_NOT_PRESENT
public static final int
NO_RESOURCES
public static final int
UNSPECIFIED
public int
errorClass
public int
errorCode
Constructors Summary
public NbtException(int errorClass, int errorCode)

        super( getErrorString( errorClass, errorCode ));
        this.errorClass = errorClass;
        this.errorCode = errorCode;
    
Methods Summary
public static java.lang.StringgetErrorString(int errorClass, int errorCode)


             
        String result = "";
        switch( errorClass ) {
            case SUCCESS:
                result += "SUCCESS";
                break;
            case ERR_NAM_SRVC:
                result += "ERR_NAM_SRVC/";
                switch( errorCode ) {
                    case FMT_ERR:
                        result += "FMT_ERR: Format Error";
                    default:
                        result += "Unknown error code: " + errorCode;
                }
                break;
            case ERR_SSN_SRVC:
                result += "ERR_SSN_SRVC/";
                switch( errorCode ) {
                    case CONNECTION_REFUSED:
                        result += "Connection refused";
                        break;
                    case NOT_LISTENING_CALLED:
                        result += "Not listening on called name";
                        break;
                    case NOT_LISTENING_CALLING:
                        result += "Not listening for calling name";
                        break;
                    case CALLED_NOT_PRESENT:
                        result += "Called name not present";
                        break;
                    case NO_RESOURCES:
                        result += "Called name present, but insufficient resources";
                        break;
                    case UNSPECIFIED:
                        result += "Unspecified error";
                        break;
                    default:
                        result += "Unknown error code: " + errorCode;
                }
                break;
            default:
                result += "unknown error class: " + errorClass;
        }
        return result;
    
public java.lang.StringtoString()

        return new String( "errorClass=" + errorClass + ",errorCode=" + errorCode + ",errorString=" + getErrorString( errorClass, errorCode ));