lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

LYNX-DEV: "table?" looks horrible


From: David Combs
Subject: LYNX-DEV: "table?" looks horrible
Date: Wed, 10 Dec 1997 13:36:48 -0800 (PST)

Is there any way to make this look better --
I think that it is supposed to be a table,
that is, a grid of some kind.

I recall from long ago lynx-dev posting that
it helped to trick the html-server (sending)
by claiming to be other than lynx.  How do I
do that, and what do I set it to?


Here is what I see on the screen:


                                 Java DataOutputStream Binary Formats (p1 of 2)
          
                     Java DataOutputStream Binary Formats
          
   Last updated 1997 May 29 by [1]Roedy Green ) 1997 Canadian Mind
   Products.
          
   When you create a file via dataOutputStream, what does the binary file
   look like? It looks like the internal binary RAM format in a
   big-endian CPU. These are also the internal formats in the Java
   Virtual Machine.
          
   Everything is stored [2]big endian , MSB (Most Significant Byte)
   first. (People who cut their teeth on Intel or the 6502 are used to
   the little endian LSB first format.) Even on Intel hardware Java uses
   big endian file formats. This permits data interchange with other
   platforms.
          
   There are no separators between fields. The files are in binary, not
   readable ASCII.
          
                        Method Type Size Description
     writeBoolean(boolean v) boolean 1 byte 8-bit 0x00=false 0x01=true
          writeByte(int v) byte 1 byte 8-bit signed binary integer
                            or 8-bit ASCII char
       writeBytes(String s) bytes 1 byte 8-bit signed binary integers
                         or string of ASCII chars.
                            not null terminated.
                               not in quotes.
                                not counted.
                         not delimited in any way.
        writeChar(int v) char 2 byte 16-bit unsigned binary integer
                          or 16-bit Unicode char.
     writeChars(String s) chars 2 byte 16-bit unsigned binary integers
                     or string of 16-bit Unicode chars.
                            not null terminated.
                               not in quotes.
                                not counted.
                         not delimited in any way.
          writeDouble(double v) double 8 bytes 64-bit IEEE binary
                                 1-bit sign
                           11-bit base 2 exponent
                                biased+1023
                      52-bit fraction, lead 1 implied
                                    e.g.
                          3. = 0x4008000000000000
                          -3. = 0xC008000000000000
            writeFloat(float v) float 4 bytes 32-bit IEEE binary
                                 1-bit sign
                           8-bit base 2 exponent
                                 biased+127
                      23-bit fraction, lead 1 implied
                                    e.g.
                               3. = 0x404000
        







Here is the source:

<!-- X-URL: http://oberon.ark.com/~roedy/binary.html -->
<BASE HREF="http://oberon.ark.com/~roedy/binary.html";>
<!DOCTYPE HTML PUBLIC "-//Netscape Comm. Corp.//DTD HTML//EN">
<HTML>
<HEAD>
   <TITLE>Java DataOutputStream Binary Formats</TITLE>
   <META NAME="GENERATOR" CONTENT="Mozilla/3.0Gold (Win95; I) [Netscape]">
   <META NAME="AUTHOR" CONTENT="Roedy Green">
</HEAD>
<BODY TEXT="#333300" BGCOLOR="#FFCC99" LINK="#FF0000" VLINK="#330099" 
ALINK="#000800">

<P><!-- SS~~00001 --><!-- 333300=brown FFCC99=tan FF00FF=red 330099=mauve 
000800=dark green 0080FF=baby blue --></P>

<H1><FONT COLOR="#0080FF">Java DataOutputStream Binary Formats </FONT></H1>

<P>Last updated 1997 May 29 by <A HREF="index.html">Roedy Green
</A>
&copy; 1997 Canadian Mind Products. </P>

<P>When you create a file via dataOutputStream, what does the binary file
look like? It looks like the internal binary RAM format in a big-endian
CPU. These are also the internal formats in the Java Virtual Machine. </P>

<P>Everything is stored <A HREF="endian.html">big endian
</A>, MSB (Most
Significant Byte) first. (People who cut their teeth on Intel or the 6502
are used to the little endian LSB first format.) Even on Intel hardware
Java uses big endian file formats. This permits data interchange with other
platforms. </P>

<P>There are no separators between fields. The files are in binary, not
readable ASCII. </P>

<TABLE BORDER=2 CELLPADDING=5 >

<TR>
<TH>Method</TH>

<TH>Type</TH>

<TH>Size</TH>

<TH>Description</TH>
</TR>

<TR>
<TD>writeBoolean(boolean v)</TD>

<TD>boolean</TD>

<TD>1 byte</TD>

<TD>8-bit 0x00=false 0x01=true</TD>
</TR>

<TR>
<TD>writeByte(int v)</TD>

<TD>byte</TD>

<TD>1 byte</TD>

<TD>8-bit signed binary integer <BR>
or 8-bit ASCII char</TD>
</TR>

<TR>
<TD>writeBytes(String s)</TD>

<TD>bytes</TD>

<TD>1 byte</TD>

<TD>8-bit signed binary integers <BR>
or string of ASCII chars. <BR>
not null terminated. <BR>
not in quotes. <BR>
not counted. <BR>
not delimited in any way.</TD>
</TR>

<TR>
<TD>writeChar(int v)</TD>

<TD>char</TD>

<TD>2 byte </TD>

<TD>16-bit unsigned binary integer <BR>
or 16-bit Unicode char.</TD>
</TR>

<TR>
<TD>writeChars(String s)</TD>

<TD>chars</TD>

<TD>2 byte </TD>

<TD>16-bit unsigned binary integers <BR>
or string of 16-bit Unicode chars. <BR>
not null terminated. <BR>
not in quotes. <BR>
not counted. <BR>
not delimited in any way.</TD>
</TR>

<TR>
<TD>writeDouble(double v)</TD>

<TD>double</TD>

<TD>8 bytes</TD>

<TD>64-bit IEEE binary <BR>
1-bit sign <BR>
11-bit base 2 exponent <BR>
biased+1023 <BR>
52-bit fraction, lead 1 implied <BR>
e.g. <BR>
3. = 0x4008000000000000 <BR>
-3. = 0xC008000000000000</TD>
</TR>

<TR>
<TD>writeFloat(float v)</TD>

<TD>float</TD>

<TD>4 bytes</TD>

<TD>32-bit IEEE binary <BR>
1-bit sign <BR>
8-bit base 2 exponent <BR>
biased+127 <BR>
23-bit fraction, lead 1 implied <BR>
e.g. <BR>
3. = 0x404000 <BR>
-3. = 0xC04000</TD>
</TR>

<TR>
<TD>writeInt(int v)</TD>

<TD>int</TD>

<TD>4 bytes</TD>

<TD>32-bit signed binary <BR>
e.g. <BR>
3 = 0x00 0x00 0x00 0x03 <BR>
-3 = 0xff 0xff 0xff 0xfd</TD>
</TR>

<TR>
<TD>writeLong(long v)</TD>

<TD>long</TD>

<TD>8 bytes </TD>

<TD>64-bit signed binary</TD>
</TR>

<TR>
<TD>writeShort(int v)</TD>

<TD>short</TD>

<TD>2 bytes</TD>

<TD>16-bit signed binary</TD>
</TR>

<TR>
<TD>writeUTF(String s)</TD>

<TD>utf</TD>

<TD>2 bytes</TD>

<TD>16-bit length count <BR>
followed by ASCII-7 string. <BR>
Not null terminated. <BR>
&quot;ABC&quot; == 0x0003414243 <BR>
non-ASCII-7 chars use multibyte <BR>
encodings with first byte having <BR>
the high bit on.

</TD>
</TR>
</TABLE>

<H2><FONT COLOR="#0080FF">UTF</FONT></H2>

<P>UTF is a compact form of Unicode that uses a mixture of 8, 16 and
24-bit codes.  Strings are stored as a 16-bit big-endian length count
followed by a 7-bit ASCII string.  Not null terminated.  "ABC" ==
0x0003414243.  Non-ASCII-7 chars use multibyte encodings with first
byte having the high bit on. UTF is an external format.  UTF strings
are interconverted to ordinary Strings during I/O by readUTF and
writeUTF. Unicode-2 supports even 32 bit characters, and UTF has been
extended to handle them as well.</P>

<TABLE border=2 cellpadding=3>

<TR><TH>Unicode</TH><TH>UTF</TH><TH>bytes required to represent the
character</TR>

<TR><TD><TT>00000000 0xxxxxxx</TT></TD><TD><TT>0xxxxxxx</TT></TD><TD>1</TD></TR>

<TR><TD><TT>00000yyy yyxxxxxx</TT></TD><TD><TT>110yyyyy 
10xxxxxx</TT></TD><TD>2</TD></TR>

<TR><TD><TT>zzzzyyyy yyxxxxxx</TT></TD><TD><TT>1110zzzz 10yyyyyy 
10xxxxxx</TT></TD><TD>3</TD></TR>

</TABLE>

<P></P><HR><P></P>

<TABLE>

<TR VALIGN=MIDDLE ALIGN=CENTER>
<TD><A 
HREF="http://ugweb.cs.ualberta.ca/~gerald/validate/?url=http://oberon.ark.com/~roedy/binary.html";><IMG
 SRC="mcom.gif" ALT="Netscape-HTML Checked!" HEIGHT=32 WIDTH=48></A>
</TD>

<TD><A HREF="index.html"><IMG SRC="flag.gif" ALT="" HEIGHT=100 WIDTH=100></A>
</TD>
<TD>You can get an updated copy of this page from
<a href="http://oberon.ark.com/~roedy/binary.html";>
http://oberon.ark.com/~roedy/binary.html</A></TD>

</TR>

<TR VALIGN=MIDDLE ALIGN=CENTER>
<TD></TD>

<TD align=CENTER><A HREF="index.html">Canadian Mind Products</A></TD>
</TR>
</TABLE>
<P></P><HR><P></P>

</BODY>
</HTML>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]