Learning Wireless Java

Errata for Learning Wireless Java

Submit your own errata for this product.


The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color Key: Serious Technical Mistake Minor Technical Mistake Language or formatting error Typo Question Note Update



Version Location Description Submitted By Date Submitted Date Corrected
Printed
Page 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.

Anonymous   
Printed
Page 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.

Anonymous   
Printed
Page 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.

Anonymous   
Printed
Page 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 ...

Anonymous