Examples of bytearray()


Examples of ariba.ui.aribaweb.util.AWByteArrayOutputStream.byteArray()

    protected AWByteArray contentByteArray ()
    {
        // iterates through all encodedStringBuffers appending to newly allocated byte buffer of appropriate size
        AWByteArrayOutputStream byteArrayOutputStream = new AWByteArrayOutputStream(8 * 1024);
        _writeContent(byteArrayOutputStream);
        return byteArrayOutputStream.byteArray();
    }

    public byte[] content ()
    {
        return contentByteArray().toByteArray();
View Full Code Here

Examples of com.foundationdb.util.ByteSource.byteArray()

        else if(value instanceof ByteBuffer) {
            buffer = (ByteBuffer)value;
        }
        else if(value instanceof ByteSource) {
            ByteSource bs = (ByteSource)value;
            buffer = ByteBuffer.wrap(bs.byteArray(), bs.byteArrayOffset(), bs.byteArrayLength());
        }
        else {
            throw new IllegalArgumentException("Requires byte[] or ByteBuffer");
        }
        return buffer;
View Full Code Here

Examples of com.foundationdb.util.ByteSource.byteArray()

            if (object instanceof byte[]) {
                bytes = (byte[])object;
            }
            else {
                ByteSource source = (ByteSource) object;
                byte[] srcArray = source.byteArray();
                int offset = source.byteArrayOffset();
                int end = offset + source.byteArrayLength();
                bytes = Arrays.copyOfRange(srcArray, offset, end);
            }
            type = MBinary.VARBINARY.instance(bytes.length, false);
View Full Code Here

Examples of com.sap.hadoop.ds.streams.Streams.ByteArrayOS.bytearray()

    ByteArrayOS bos = dos.getUnderlyingStream();
    bos.reset();
    w.write(dos);
    ensureCapacity(bos.len());
    int i = currentSize * 2;
    System.arraycopy(bos.bytearray(), 0, bytes, bytesUsed, bos.len());
    offsetsArray[i] = bytesUsed;
    offsetsArray[i+1] = bos.len();
    currentSize += 1;
    bytesUsed += bos.len();
    lastModified = System.nanoTime();
View Full Code Here

Examples of com.sap.hadoop.ds.streams.Streams.ByteArrayOS.bytearray()

    ByteArrayOS bos = dos.getUnderlyingStream();
    bos.reset();
    w.write(dos);
    ensureCapacity(bos.len(), true);
    int i = currentSize * 2;
    System.arraycopy(bos.bytearray(), 0, bytes, bytesUsed, bos.len());
    keyOffsetsArray[i] = bytesUsed;
    keyOffsetsArray[i+1] = bos.len();
   
    int[] posRet = position(new EntryPosition(currentSize));
    int pos = posRet[1];
View Full Code Here

Examples of com.sap.hadoop.ds.streams.Streams.ByteArrayOS.bytearray()

    DataOStream dos = Streams.dos.get();
    ByteArrayOS bos = dos.getUnderlyingStream();
    bos.reset();
    w.write(dos);
    ensureCapacity(bos.len(), false);
    System.arraycopy(bos.bytearray(), 0, bytes, bytesUsed, bos.len());
    valueOffsetsArray[i] = bytesUsed;
    valueOffsetsArray[i+1] = bos.len();
    bytesUsed += bos.len();
  }
 
View Full Code Here

Examples of com.sap.hadoop.ds.streams.Streams.ByteArrayOS.bytearray()

    {
      DataOStream dos = Streams.dos.get();
      ByteArrayOS bos = dos.getUnderlyingStream();
      bos.reset();
      w.write(dos);
      TempEntryPosition te = new TempEntryPosition(bos.bytearray(), bos.len());
      int posRet[] = position(te);
      int pos = posRet[1];
      return (posRet[0] == 1) ? startOffset + pos : -1;
    }
    catch(IOException ie)
View Full Code Here

Examples of com.sap.hadoop.ds.streams.Streams.ByteArrayOS.bytearray()

    {
      DataOStream dos = Streams.dos.get();
      ByteArrayOS bos = dos.getUnderlyingStream();
      bos.reset();
      key.write(dos);
      int p = splitList.getPartition(bos.bytearray(), 0, bos.len());
      ByteBasedSortedMap mp = bringInMemory(p);
     
      try
      {
        int prevSz = mp.size();
View Full Code Here

Examples of com.sap.hadoop.ds.streams.Streams.ByteArrayOS.bytearray()

    {
      DataOStream dos = Streams.dos.get();
      ByteArrayOS bos = dos.getUnderlyingStream();
      bos.reset();
      w.write(dos);
      int p = splitList.getPartition(bos.bytearray(), 0, bos.len());
      ByteBasedSortedMap mp = partitions.get(p);
      return mp.getIndex(w);
    }
    catch(IOException ie)
    {
View Full Code Here

Examples of com.sap.hadoop.ds.streams.Streams.ByteArrayOS.bytearray()

    {
      DataOStream dos = Streams.dos.get();
      ByteArrayOS bos = dos.getUnderlyingStream();
      bos.reset();
      key.write(dos);
      int p = splitList.getPartition(bos.bytearray(), 0, bos.len());
      ByteBasedSortedMap mp = partitions.get(p);
      return mp.getValue(key, value);
    }
    catch(IOException ie)
    {
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.