KickJava   Java API By Example, From Geeks To Geeks.

Java > Java SE, EE, ME > java > lang > Short

java.lang
Class Short

java.lang.Object
  extended by java.lang.Number
      extended by java.lang.Short
All Implemented Interfaces:
Serializable, Comparable<Short>
See Also:
Top Examples, Source Code

public byte byteValue()
See Also:
Number
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[1818]Use of Radix for IP address
By mrids on 2006/09/13 07:31:29  Rate
StringTokenizer tokenizer = new StringTokenizer ( ipAddress, "." ) ; 
  
  
   short [  ]  ipSubunits = new short [ 4 ] ; 
         try  {  
             ipSubunits [ 0 ]  =  ( short )  ( Short.parseShort ( tokenizer.nextToken (  )  )  & 0xFF ) ; 
             ipSubunits [ 1 ]  =  ( short )  ( Short.parseShort ( tokenizer.nextToken (  )  )  & 0xFF ) ; 
             ipSubunits [ 2 ]  =  ( short )  ( Short.parseShort ( tokenizer.nextToken (  )  )  & 0xFF ) ; 
             ipSubunits [ 3 ]  =  ( short )  ( Short.parseShort ( tokenizer.nextToken (  )  )  & 0xFF ) ; 
          }  catch ( NumberFormatException numEx )   {  
             numEx.printStackTrace (  ) ; 
             throw new KaASException ( numEx.getMessage (  )  ) ; 
          } // try-catch 
 


public int compareTo(Object o)
See Also:
Comparable
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public int compareTo(Short anotherShort)
See Also:
Comparable, compareTo
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static Short decode(String nm)
                    throws NumberFormatException
See Also:
parseShort(java.lang.String, int)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public double doubleValue()
See Also:
Number
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public boolean equals(Object obj)
See Also:
Hashtable, Object.hashCode()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public float floatValue()
See Also:
Number
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public int hashCode()
See Also:
Hashtable, Object.equals(java.lang.Object)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public int intValue()
See Also:
Number
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public long longValue()
See Also:
Number
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final short MAX_VALUE
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final short MIN_VALUE
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static short parseShort(String s)
                        throws NumberFormatException
See Also:
parseShort(java.lang.String, int)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static short parseShort(String s,
                               int radix)
                        throws NumberFormatException
See Also:
Character.MAX_RADIX, Character.MIN_RADIX, Character.digit(char, int)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static short reverseBytes(short i)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public Short(String s)
      throws NumberFormatException
See Also:
parseShort(java.lang.String, int)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public Short(short value)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public short shortValue()
See Also:
Number
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final int SIZE
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public String toString()
See Also:
Object, toString(short)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static String toString(short s)
See Also:
Integer.toString(int)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Class<Short> TYPE
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static Short valueOf(String s)
                     throws NumberFormatException
See Also:
parseShort(java.lang.String)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static Short valueOf(String s,
                            int radix)
                     throws NumberFormatException
See Also:
parseShort(java.lang.String, int)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static Short valueOf(short s)
See Also:
Short(short)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  

Popular Tags