Package org.apache.derby.iapi.util

Examples of org.apache.derby.iapi.util.ByteArray


                // column is long.

                if (!(column instanceof InputStream))
                {
                    // Convert already written object to an InputStream.
                    ByteArray fieldData =
                        new ByteArray(
                            ((DynamicByteArrayOutputStream)out).getByteArray(),
                            (columnBeginPosition), fieldDataLength);

                    ByteArrayInputStream columnIn =
                        new ByteArrayInputStream(
                            fieldData.getArray(), columnBeginPosition,
                            fieldDataLength);

                    MemByteHolder byteHolder =
                        new MemByteHolder(fieldDataLength + 1);
View Full Code Here


    }

    // set the position to the beginning of the buffer
    logBuffer.setPosition(optionalDataStart);

    this.preparedLog = new ByteArray(logBuffer.getByteArray(), optionalDataStart,
      optionalDataLength);

  }
View Full Code Here

 
    ClassFormatOutput cfo = new ClassFormatOutput(classFileSize + 200);

    put(cfo);

    return new ByteArray(cfo.getData(), 0, cfo.size());

  }
View Full Code Here

    }

    // set the position to the beginning of the buffer
    logBuffer.setPosition(optionalDataStart);

    this.preparedLog = new ByteArray(logBuffer.getByteArray(), optionalDataStart,
      optionalDataLength);
  }
View Full Code Here

    int optionalDataLength = logBuffer.getPosition() - optionalDataStart;

    // set the position to the beginning of the buffer
    logBuffer.setPosition(optionalDataStart);

    this.preparedLog = new ByteArray(
            logBuffer.getByteArray(), optionalDataStart, optionalDataLength);
  }
View Full Code Here

    }

    int optionalDataStart = localLogBuffer.getBeginPosition();
    int optionalDataLength = localLogBuffer.getPosition() - optionalDataStart;

    this.preparedLog = new ByteArray (localLogBuffer.getByteArray(), optionalDataStart,
      optionalDataLength);
  }
View Full Code Here

    }

    // set the position to the beginning of the buffer
    logBuffer.setPosition(optionalDataStart);

    this.preparedLog = new ByteArray(logBuffer.getByteArray(), optionalDataStart,
      optionalDataLength);
  }
View Full Code Here

      int optionalDataLength = 0;
      int optionalDataOffset = 0;
      int completeLength = 0;

      ByteArray preparedLogArray = operation.getPreparedLog();
      if (preparedLogArray != null) {

        preparedLog = preparedLogArray.getArray();
        optionalDataLength = preparedLogArray.getLength();
        optionalDataOffset = preparedLogArray.getOffset();

        // There is a race condition if the operation is a begin tran in
        // that between the time the beginXact log record is written to
        // disk and the time the transaction object is updated in the
        // beginXact.doMe method, other log records may be written.
View Full Code Here

  GeneratedClass getGeneratedClass(ByteArray savedBytes) throws StandardException {
    if (gc != null) return gc;

    if (savedBytes != null)
    {
      ByteArray classBytecode = cb.getClassBytecode();

      // note: be sure to set the length since
      // the class builder allocates the byte array
      // in big chunks
      savedBytes.setBytes(classBytecode.getArray());
      savedBytes.setLength(classBytecode.getLength());
    }

      gc =  cb.getGeneratedClass();

    return gc; // !! yippee !! here it is...
View Full Code Here

    super.readExternal(in);
    operation = in.readByte();

    if (operation == CREATE && hasCreateByteArray)
    {
      createByteArray = new ByteArray();
      createByteArray.readExternal(in);
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.util.ByteArray

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.