FileDocCategorySizeDatePackage
UnsignedByte.javaAPI DocApache Axis 1.42069Sat Apr 22 18:57:28 BST 2006org.apache.axis.types

UnsignedByte

public class UnsignedByte extends UnsignedShort
Custom class for supporting primitive XSD data type UnsignedByte
author
Chris Haddad
see
XML Schema 3.3.24

Fields Summary
Constructors Summary
public UnsignedByte()


    
public UnsignedByte(long sValue)
ctor for UnsignedByte

exception
Exception will be thrown if validation fails

      setValue(sValue);
    
public UnsignedByte(String sValue)

      setValue(Long.parseLong(sValue));
    
Methods Summary
public static booleanisValid(long sValue)
validate the value against the xsd value space definition

param
sValue number to check against range

      if ( (sValue < 0L ) ||  (sValue > 255L) )
        return false;
      else
        return true;
    
public voidsetValue(long sValue)
validates the data and sets the value for the object.

param
sValue the number to set

        if (UnsignedByte.isValid(sValue) == false)
            throw new NumberFormatException(
                    Messages.getMessage("badUnsignedByte00") +
                    String.valueOf(sValue) + "]");
        lValue = new Long(sValue);