Converter 5.5 build: 9450 released: 2011-12-30 Generates Java source to interconvert basic types. Copyright: (c) 2012 Canadian Mind Products. signed Java Applet (that can also be run as an application). Download from: http://mindprod.com/products1.html#CONVERTER View HTML to run this program online at: http://mindprod.com/applet/converter.html ===> Free <=== Full source included. You may even include the source code, modified or unmodified in free/commercial open source/proprietary programs that you write and distribute. May be used freely for any purpose but military. For more details on this restriction, see http://mindprod.com/contact/nonmil.html If you include any Canadian Mind Products code in your own applications, your app too must be labeled non-military use only. All Java jars and source code are included. ---- Prerequisites: This program runs under any OS, (e.g. Win2K/XP/Vista/W7x86/W7-64/OSX/Linux/Solaris/AIX...) so long as you have <><> Java version 1.5 <><> or later installed (32-bit or 64-bit Java). See http://mindprod.com/jgloss/installingjava.html for details. ---- Installing on a PC: Download source and compiled class files to run on your own machine as an application or Applet First install a recent Java JDK or JVM. See http://mindprod.com/jgloss/installingjava.html. To install, extract the zip download with WinZip (or similar unzip utility) into any directory you please, often J:\ -- ticking off the "use folder names" option. To run as an application,type: java -ea -jar J:\com\mindprod\converter\converter.jar {put any parms here} adjusting as necessary to account for where the jar file is. ---- Installing on a MacIntosh: Use Safari to download source and compiled class files to run on your own machine as an application or Applet. Safari will automatically unpack the zip into ~/Downloads (version 10.5) [or on the Desktop (version 10.4 and earlier)]. First install a recent Java JDK or JVM. See http://mindprod.com/jgloss/installingjava.html. You may optionally move the download tree to a permanent home. I don't have a MacIntosh, just a PC, so I can't test my Java programs for Mac compatibility. In theory they should work without problems, but in practice that does not always happen. If you have problems please, let me know, preferably with screenshots and complete verbatim error messages. To run as an application, without parameters, just double click the jar file. To run as an application with parameters, in bash shell type: open Terminal.app cd ~/Desktop java -ea -jar com/mindprod/converter/converter.jar {put any parms here} adjusting as necessary to account for where the jar file is. ---- Rebuilding: The zip already contains the necessary class and jar files, so unless you modify the program, there is no need to recompile the source or rebuild the jar. Configure.java basedir="E:/" in rebuild.xml to the drive where your files are. Configure.java your certificate name with environment SET cert=mindprodcert2012dsa Configure.java your certificate password with environment SET jarsignerpassword=sesame Use ANT and rebuild.xml, not build.xml, to recompile and recreate the jar. ---- Use: Conversion teaching tool. Shows you how to convert any of the 19 basic Java types into any of the other a total of 361 possible conversions. Mutable Primitives Immutable Objects boolean Boolean signed byte signed Byte unsigned byte unsigned Byte short Short char Character int Integer long Long float Float double Double char[]* String * not implemented. It works either as an application or as an applet that needs to run in JDK 1.4+ capable browser. Source code and sample HTML included. May be freely distributed and used for any purpose except military. ---- Version History: 1.0 1997-12-17 initial release. 1.1 1998-01-03 clean up minor typos test routine to ensure all suggested code compiles. examples all initialise to make clean compiles. generates HTML table for those without Java. 1.2 1998-01-04 make into both application and applet 1.3 1998-01-13 split into two classes. don't show initialisation, except for test. 1.4 1998-02-14 descriptions now to, from order. show NumberFormatExceptions box a little wider. get rid of nugatory setSize, setBounds remove FontSaver. 1.5 1998-05-08 Activator html tidy with SlickEdit compile under Symantec Visual Cafe 2.5 1.6 1998-06-23 rename SymItem to TheListener. 1.7 1998-08-07 add +-'0' to char conversion options. 1.8 1998-11-11 new address and phone. 1.9 1998-11-29 generate better HTML, with &amp &quote etc. 2.0 1998-12-13 add "alternatively" comments. add radix conversions on byte, char, short 2.1 1998-12-13 increase size of Window 2.2 1998-12-14 switch over to using a jar file. check Java version slightly different colour scheme. use com.mindprod.converter package. 2.3 1998-12-25 misc comment and HTML tidying. 2.4 1999-01-29 Double.parseDouble and Float.parseFloat for JDK 1.2 2.5 1999-08-14 add *best* comment to align better with *or new phone number. 2.6 1999-08-23 DecimalFormat for float, Float, double and Double 2.7 1999-09-19 add Menu AboutBox 2.8 1999-10-05 rename jdk 2 back to jdk 1.2 2.9 1999-10-18 prefer new XXXX to XXXX.valueOf remove trim requirement on Double.valueOf(String); 3.0 1999-12-03 toHexString toBinaryString toOctalString 3.1 2001-04-26 faster boolean --> Boolean 3.2 2001-06-21 prefer valueOf to toString 3.3 2001-08-01 add comments about when sign extension occurs. 3.4 2001-12-01 improved boolean -> String : String.valueOf(t); 3.5 2002-04-01 add new way to convert String -> boolean 3.6 2002-04-05 lower case package name, following Sun conventions 3.7 2002-04-22 notes on locale-sensitivity 3.8 2004-05-07 add JDK 1.5 boxing-unboxing int<->Integer etc. short <-> Integer. add Short type. 3.9 2004-05-10 add IEEE conversions longBitsToDouble etc. 4.0 2004-05-30 add about box 4.1 2004-06-28 better labelling on generated HTML 4.2 2004-07-07 notes about format rounding. 4.3 2005-06-17 improved consistency of bat files. 4.4 2005-12-04 more instructions 4.5 2005-12-09 use of JDK 1.5+ Integer.valueOf(int) and Long.valueOf(long) 4.6 2005-12-15 use of Character.digit( char c, int radix ) 4.7 2005-12-16 use of + '0' to get to char. \n after each comment to make code easier to read 4.8 2006-03-04 reformat with IntelliJ, add Javadoc 4.9 2007-05-08 add PAD files and a new icon. 5.0 2008-03-03 correct spelling mistakes, display build and release date. Convert to JDK 1.5 5.1 2008-03-25 use enums, split off Type and Generate classes. add signed/unsigned Byte. 5.2 2008-03-26 better code for unsigned Bytes. 5.3 2009-03-30 optimise suggested conversion code based on suggestions from Intellij Idea Inspector. correct table entries for unsigned conversions that could not be handled purely with autoboxing. 5.4 2011-12-03 configurable Look and Feel 5.5 2011-12-30 tweaked some conversions involving Integer, Long and unsigned. -30-