🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.java.programmer
Article #552

Re: indexed sequential files

#552
From: Christopher Clark
Date: Tue, 24 Mar 1998 00:00
30 lines
2214 bytes
Peter van der Linden wrote:
> Christopher Clark  <compudat@cadvision.com> wrote:
> >  Umm...  Hashtables aren't an ordered storage, which would make the
> >sequential part difficult...
> Good point.   Maybe define an enumeration on the hastable as well.
> Or -- if you restrict to fixed length records -- just read the file
> using an input stream.

  AFAIK, an Enumeration on the Hashtable just returns them in hashcode
order.  Great as an "annoy client" and-or "pseudo-random" switch, but
not very practical.  OTOH, a JDK1.2 TreeMap works nicely, if a bit too
deep for index purposes.

  Personally, I'd extend what I saw in "Java Algorithms" to accept a
RandomAccessFile and a (1.2) Map.  Then, you can tailor your index to
you intended access.  (Mind you, I also like hitting myself in the head
with bricks...)

              LE    E.
It's just so F  X  L  .
                 IB    .  :-)

@>-`--,--
Chris Clark                         kitanin@hotmail.com
Compudata Systems Consulting, Inc.  compudat@cadvision.com
                                    ICQ#9342023

  "Now, I wonder who the deuce that could have been?"
		-Sherlock Holmes
Technical Details
Message-ID: <3517DD56.B78E073B@cadvision.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3512B77F.3F54@latl.unige.ch> <6eudrn$9h3$1@shell15.ba.best.com> <35168988.87D40E56@cadvision.com> <6f67kq$2e2$1@shell15.ba.best.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 116694,922dcb7e3b8787d7
X-Google-Attributes: gid116694,public
X-Google-Thread: f5e83,922dcb7e3b8787d7
X-Google-Attributes: gidf5e83,public
X-Google-Thread: f778e,922dcb7e3b8787d7
X-Google-Attributes: gidf778e,public
X-Google-Thread: 10a146,922dcb7e3b8787d7
X-Google-Attributes: gid10a146,public
X-Google-Thread: 10990d,922dcb7e3b8787d7
X-Google-Attributes: gid10990d,public
From: Christopher Clark <compudat@cadvision.com>
Subject: Re: indexed sequential files
Date: 1998/03/24
Message-ID: <3517DD56.B78E073B@cadvision.com>
X-Deja-AN: 337218556
Content-Transfer-Encoding: 7bit
References: <3512B77F.3F54@latl.unige.ch> <6eudrn$9h3$1@shell15.ba.best.com> <35168988.87D40E56@cadvision.com> <6f67kq$2e2$1@shell15.ba.best.com>
MIME-Version: 1.0
X-NNTP-Posting-Host: 204.50.1.43
Content-Type: text/plain; charset=us-ascii
Organization: Compudata Systems Consulting Inc.
Newsgroups: comp.lang.java.programmer,comp.lang.java.softwaretools,ug.comp,ug.cui,ch.si.general