createOutput() creates a new file, overwriting the old one. If you open the IndexInput before you call createOutput() for the 2nd time, you should see the file.
And you definitely shouldn't have more than one IndexOutput open on the same file (but that's not your problem here). -Yonik On Thu, Jun 19, 2008 at 3:10 PM, Jason Rutherglen <[EMAIL PROTECTED]> wrote: > public void testMain() throws IOException { > RAMDirectory ramDirectory = new RAMDirectory(); > IndexOutput output = ramDirectory.createOutput("test"); > byte[] bytes = "hello world".getBytes("UTF-8"); > output.writeBytes(bytes, bytes.length); > output.flush(); > System.out.println("fileLength: "+ramDirectory.fileLength("test")); > output = ramDirectory.createOutput("test"); > IndexInput input = ramDirectory.openInput("test"); > System.out.println("input length: "+input.length()); > } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]