Examples of ByteArray


Examples of net.yacy.kelondro.util.ByteArray

    public void add(final ReferenceContainer<ReferenceType> container) throws RowSpaceExceededException {
        // this puts the entries into the cache
        if (this.cache == null || container == null || container.isEmpty()) return;

        // put new words into cache
        final ByteArray tha = new ByteArray(container.getTermHash());
        int added = 0;
        synchronized (this.cache) {
            ReferenceContainer<ReferenceType> entries = this.cache.get(tha); // null pointer exception? wordhash != null! must be cache==null
            if (entries == null) {
                entries = container.topLevelClone();
View Full Code Here

Examples of net.yacy.kelondro.util.ByteArray

    }

    public void add(final byte[] termHash, final ReferenceType newEntry) throws RowSpaceExceededException {
        assert this.cache != null;
        if (this.cache == null) return;
        final ByteArray tha = new ByteArray(termHash);

        // first access the cache without synchronization
        ReferenceContainer<ReferenceType> container = this.cache.remove(tha);
        if (container == null) container = new ReferenceContainer<ReferenceType>(this.factory, termHash, 1);
        container.put(newEntry);
View Full Code Here

Examples of net.yacy.kelondro.util.ByteArray

            }
        }

        public void remove() {
            System.arraycopy(this.cachecopy, this.p, this.cachecopy, this.p - 1, this.cachecopy.size() - this.p);
            ReferenceContainerCache.this.cache.remove(new ByteArray(this.latestTermHash));
        }
View Full Code Here

Examples of org.activemq.io.util.ByteArray

    protected void writeTextMessage(ActiveMQTextMessage message, DataOutput out) throws JMSException, IOException {
        writeMessage(message, message.getText(), out);
    }

    protected void writeBytesMessage(ActiveMQBytesMessage message, DataOutput out) throws IOException {
        ByteArray data = message.getBodyAsBytes();
        String text = encodeBinary(data.getBuf(), data.getOffset(), data.getLength());
        writeMessage(message, text, out);
    }
View Full Code Here

Examples of org.activemq.message.util.ByteArray

                    }
                    else {
                        msg = (ActiveMQMessage) consumer.receiveNoWait();
                    }
                    if (msg != null) {
                        ByteArray ba = msg.getBodyAsBytes();
                        if (ba != null) {
                            len += ba.getLength();
                            process(ba);
                        }
                    }
                    else if (closed) {
                        break;
View Full Code Here

Examples of org.apache.axis.utils.ByteArray

    public void saveChanges() throws AxisFault {
        log.debug("Enter: SOAPPart::saveChanges");
        if ( currentForm == FORM_SOAPENVELOPE ||
             currentForm == FORM_FAULT ){
            currentEncoding = XMLUtils.getEncoding(msgObject, null);
            ByteArray array = new ByteArray();
            try {
                this.writeTo(array);
                array.flush();
            } catch (Exception e) {
                throw AxisFault.makeFault(e);
            }
            setCurrentForm( array, FORM_OPTIMIZED );
            if (log.isDebugEnabled()) {
View Full Code Here

Examples of org.apache.blur.lucene.fst.ByteArray

    this.blockSize = blockSize;
    this.blockMask = blockSize - 1;
    long left = numBytes;
    while (left > 0) {
      final int chunk = (int) Math.min(blockSize, left);
      ByteArray block = factory.newByteArray(chunk);
      block.readBytes(in, 0, block.length());
      blocks.add(block);
      left -= chunk;
    }

    // So .getPosition still works
View Full Code Here

Examples of org.apache.crunch.impl.spark.ByteArray

      return iter.hasNext() || key != null;
    }

    @Override
    public Tuple2<ByteArray, List<byte[]>> next() {
      ByteArray nextKey = null;
      List<byte[]> next = null;
      while (iter.hasNext()) {
        Tuple2<ByteArray, List<byte[]>> t = iter.next();
        if (key == null) {
          key = t._1();
View Full Code Here

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

 
    ClassFormatOutput cfo = new ClassFormatOutput(classFileSize + 200);

    put(cfo);

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

  }
View Full Code Here

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

    {
      throw StandardException.newException(
                SQLState.DATA_UNEXPECTED_EXCEPTION, ioe);
    }

    return new ByteArray(array);
  }
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.