tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alicia Sánchez-Mora" <aliciasm...@gmail.com>
Subject Inicialization of an UnsignedByte variable
Date Wed, 14 Feb 2007 10:43:59 GMT
  Hi,

I want to assign a value to a variable of type UnsignedByte. In
the  function it looks like this:

public String function (){

  final UnsignedByte ptr =new UnsignedByte() ;
  final Base64 blob = new Base64 (ptr, 10, "id","type","options"*);
  ...
}

I want the "ptr" variable to have a value other than empty. The constructor
of UnsignedByte is defined as public UnsignedByte(java.lang.String sValue)
When I initialized ptr with  final

UnsignedByte ptr = new UnsignedByte("abc");

the result was  that tomcat got hung up and throws a NumberFormatException.
This is because a string can not be converted to a long. So what is the
appropriate way…

Thanks in advance,

Alicia

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message