Package org.hsqldb.rowio

Examples of org.hsqldb.rowio.RowOutputBinary


     * resultOut is reused to trasmit all remote calls for session management.
     * Here the structure is preset for sending attributes.
     */
    private void initStructures() {

        rowOut    = new RowOutputBinary(mainBuffer);
        rowIn     = new RowInputBinary(rowOut);
        resultOut = Result.newSessionAttributesResult();

        resultOut.add(new Object[7]);
    }
View Full Code Here


    this.databaseID = localResult2.databaseID;
  }

  private void initStructures()
  {
    this.rowOut = new RowOutputBinary(this.mainBuffer);
    this.rowIn = new RowInputBinary(this.rowOut);
    this.resultOut = Result.newSessionAttributesResult();
    this.resultOut.add(new Object[7]);
  }
View Full Code Here

    super(paramDatabase, paramString, paramBoolean1, paramBoolean2, false);
  }

  protected void initBuffers()
  {
    this.rowOut = new RowOutputBinary();
  }
View Full Code Here

  public void init(ServletConfig paramServletConfig)
  {
    try
    {
      super.init(paramServletConfig);
      this.rowOut = new RowOutputBinary(256);
      this.rowIn = new RowInputBinary(this.rowOut);
    }
    catch (ServletException localServletException)
    {
      log(localServletException.toString());
View Full Code Here

  int[] writeTableToDataFile(Table paramTable)
    throws IOException, HsqlException
  {
    Session localSession = this.database.getSessionManager().getSysSession();
    RowOutputBinary localRowOutputBinary = new RowOutputBinary();
    DoubleIntIndex localDoubleIntIndex = new DoubleIntIndex(paramTable.getPrimaryIndex().sizeEstimate(), false);
    int[] arrayOfInt = paramTable.getIndexRootsArray();
    long l = this.fileOffset;
    int i = 0;
    localDoubleIntIndex.setKeysSearchTarget();
    Trace.printSystemOut("lookup begins: " + this.stopw.elapsedTime());
    RowIterator localRowIterator = paramTable.rowIterator(localSession);
    Row localRow;
    while (localRowIterator.hasNext())
    {
      localRow = localRowIterator.next();
      localDoubleIntIndex.addUnsorted(localRow.getPos(), (int)(l / this.scale));
      if (i % 50000 == 0)
        Trace.printSystemOut("pointer pair for row " + i + " " + localRow.getPos() + " " + l);
      l += localRow.getStorageSize();
      i++;
    }
    Trace.printSystemOut(paramTable.getName().name + " list done ", this.stopw.elapsedTime());
    i = 0;
    localRowIterator = paramTable.rowIterator(localSession);
    while (localRowIterator.hasNext())
    {
      localRow = localRowIterator.next();
      localRowOutputBinary.reset();
      localRow.write(localRowOutputBinary, localDoubleIntIndex);
      this.fileStreamOut.write(localRowOutputBinary.getOutputStream().getBuffer(), 0, localRowOutputBinary.size());
      this.fileOffset += localRow.getStorageSize();
      if (i % 50000 == 0)
        Trace.printSystemOut(i + " rows " + this.stopw.elapsedTime());
      i++;
    }
View Full Code Here

  }

  protected void initBuffers()
  {
    if ((this.rowOut == null) || (((RowOutputBinary)this.rowOut).getBuffer().length > 256))
      this.rowOut = new RowOutputBinary(256);
    if ((this.rowIn == null) || (((RowInputBinary)this.rowIn).getBuffer().length > 256))
      this.rowIn = new RowInputBinary(new byte[256]);
  }
View Full Code Here

TOP

Related Classes of org.hsqldb.rowio.RowOutputBinary

Copyright © 2018 www.massapicom. 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.