[NeXus-code-tickets] [NeXusCode] #83: The Java function NeXusFile has a problem

NeXus Data Format Library and Applications noreply at nexusformat.org
Wed Jun 6 16:30:48 BST 2007


#83: The Java function NeXusFile has a problem
-----------------------+----------------------------------------------------
  Reporter:  Rwong     |       Owner:  Mark Koennecke
      Type:  defect    |      Status:  new           
  Priority:  major     |   Milestone:                
 Component:  bindings  |     Version:  4.0.0         
Resolution:            |    Keywords:                
-----------------------+----------------------------------------------------
Comment (by Rwong):

 I have found a solution for this problem.

 If the string "units" does not have a null character at the end of the
 string, then
 the function "nf.putattr("Units",units.getBytes(),NexusFile.NX_CHAR);"
 appends garbage characters to the end of the string.

 A solution for this problem is to make sure that the string "units" has a
 null character at the end of the string, e.g. String units = "MegaFarts"
 +'\0';

-- 
Ticket URL: <http://trac.nexusformat.org/code/ticket/83#comment:3>
NeXus Data Format Library and Applications <http://www.nexusformat.org/>
NeXus Data Format Library and Applications



More information about the NeXus-code-tickets mailing list