Package org.exist.storage.io

Examples of org.exist.storage.io.VariableByteOutputStream.toByteArray()


      try {
        proxy.getNodeId().write(buf);
      } catch (IOException e) {
        throw new RuntimeException("unable to serialize node's id to compute hashCode", e);
      }
      return proxy.getDocument().getURI().hashCode() ^ Arrays.hashCode(buf.toByteArray());
    } else {
      return item.hashCode();
    }
  }
 
View Full Code Here


    private void saveSymbols() throws EXistException {
        try {
            final VariableByteOutputStream os = new VariableByteOutputStream(256);
            writeAll(os);
            final FileOutputStream fos = new FileOutputStream(getFile().getAbsolutePath(), false);
            fos.write(os.toByteArray());
            fos.close();
        } catch(final FileNotFoundException e) {
            throw new EXistException("File not found: " + this.getFile().getAbsolutePath());
        } catch(final IOException e) {
            throw new EXistException("IO error occurred while creating "
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.