Learning Wireless Java by Qusay Mahmoud This errata page lists errors outstanding in the most recent printing. If you have technical questions or error reports, you can send them to booktech@oreilly.com. Please specify the printing date of your copy. This page was updated January 10, 2003. Here's a key to the markup: [page-number]: serious technical mistake {page-number}: minor technical mistake : important language/formatting problem (page-number): language change or minor formatting problem ?page-number?: reader question or request for clarification Confirmed errors: {35} MIDlet transition states figure in the book show an arrow from the Destroyed state to the Active state. This should be reversed -- the arrow should go from the Acive state to the Destroyed state. {43} MIDlet transition states figure in the book show an arrow from the Destroyed state to the Active state. This should be reversed -- the arrow should go from the Acive state to the Destroyed state. (140) Middle of page, code block beginning with "try {"; In the first line inside this code block: ByteArrayOutputStream baos = new ByteArrayOutputstream(); The word "stream" at the far right should be capitalized. AUTHOR: I can confirm the error as a typo. (140) Also, there is a variable "record" mentioned in the code which may be a string, but it is hard to be sure without a complete code snippet. The variable recordNumber is also not declared anywhere. Also the confusing relationship between the "baos" object and the "dos" object is not explained. Some explanation would be good to reassure the reader that this seemingly erroneous code is doing something meaningful: try { ByteArrayOutputStream baos = new ByteArrayOutputstream(); DataOutputStream dos = new DataOutputStream(baos); dos.writeUTF(record); // what is going on, is dos magically altering baos? // dos is not used after this... please to explain Byte b[] = baos.toByteArray(); recordNumber = db.addRecord(b, 0, b.length); } catch (Exception e) { // Handle exception } AUTHOR: Regarding the second comment and the relationship between "baso" and "dos" below is: ByteArrayOutputStream baos = new ByteArrayOutputstream(); DataOutputStream dos = new DataOutputStream(baos); Here we have created two streams (1) a byte array that is managed internally by the virtual machine. This array will hold the data we'll write to the record store. (2) the data output stream is a filter that provides methods for writing primitive data types. The internal byte array will contain portable binary data....and is used for prtability reasons. If we write a float into the byte array, we'll get a float back no matter how the underlined system represents a float using 32 bits or 64 bits or ...