Examples of array()


Examples of org.eclipse.jetty.io.ByteArrayBuffer.array()

      Log.warn(t);
      //if (handler.hasException())
        //Log.warn(handler.getException());
       
      if (Log.isDebugEnabled())
        Log.debug("Buffer content: \r\n" + HexString.toDetailedHexString(buffer.array(), p.getLength()));
    }
   
  }
 
  public SipConnection getConnection(InetAddress address, int port)
View Full Code Here

Examples of org.elasticsearch.common.bytes.BytesArray.array()

        if (compressor != null) {
            // already compressed...
            this.bytes = data.toBytes();
        } else {
            BytesArray bytesArray = data.toBytesArray();
            this.bytes = CompressorFactory.defaultCompressor().compress(bytesArray.array(), bytesArray.arrayOffset(), bytesArray.length());
        }
    }

    /**
     * Constructs a new compressed string, assuming the bytes are UTF8, by copying it over.
View Full Code Here

Examples of org.elasticsearch.common.bytes.BytesReference.array()

        String[] indices = RestActions.splitIndices(request.param("index"));
        Carrot2Request searchRequest = new Carrot2Request(indices);
        // get the content, and put it in the body
        if (request.hasContent()) {
            BytesReference content = request.content();
            searchRequest.source(content.array(), content.arrayOffset(), content.length(), request.contentUnsafe());
        } else {
            String source = request.param("source");
            if (source != null) {
                searchRequest.source(source);
            }
View Full Code Here

Examples of org.elasticsearch.common.xcontent.XContentBuilder.array()

                        builder.endObject();
                    }
                    builder.endArray();
                }
                if (status.getContributors() != null) {
                    builder.array("contributor", status.getContributors());
                }
                if (status.getGeoLocation() != null) {
                    builder.startObject("location");
                    builder.field("lat", status.getGeoLocation().getLatitude());
                    builder.field("lon", status.getGeoLocation().getLongitude());
View Full Code Here

Examples of org.glassfish.grizzly.Buffer.array()

           
            if (!mm.willAllocateDirect(chunkSize)) {
                buffer = mm.allocate(chunkSize);
                final int len;
                if (!buffer.isComposite()) {
                    len = inputStream.read(buffer.array(),
                            buffer.position() + buffer.arrayOffset(),
                            chunkSize);
                } else {
                    final BufferArray bufferArray = buffer.toBufferArray();
                    final int size = bufferArray.size();
View Full Code Here

Examples of org.hisrc.jscm.codemodel.JSCodeModel.array()

    literals.expression(codeModel.decimal("-1.1"));
    literals.expression(codeModel.decimal("0.0"));
    literals.expression(codeModel.decimal("1.1"));
    literals.expression(codeModel.string("a"));

    primaryExpressions.expression(codeModel.array());
    primaryExpressions.expression(codeModel.array().append(x, y));
    primaryExpressions.expression(codeModel.array().append(
        codeModel.integer(0), codeModel.string("a")));
    primaryExpressions.expression(codeModel.object());
    primaryExpressions.expression(codeModel.object().append("zero", x)
View Full Code Here

Examples of org.hisrc.jscm.codemodel.impl.CodeModelImpl.array()

    literals.expression(codeModel.decimal("-1.1"));
    literals.expression(codeModel.decimal("0.0"));
    literals.expression(codeModel.decimal("1.1"));
    literals.expression(codeModel.string("a"));

    primaryExpressions.expression(codeModel.array());
    primaryExpressions.expression(codeModel.array().append(x, y));
    primaryExpressions.expression(codeModel.array().append(
        codeModel.integer(0), codeModel.string("a")));
    primaryExpressions.expression(codeModel.object());
    primaryExpressions.expression(codeModel.object().append("zero", x)
View Full Code Here

Examples of org.jboss.netty.buffer.BigEndianHeapChannelBuffer.array()

        int size = message.getSerializedSize();
        ChannelBuffer buffer = new BigEndianHeapChannelBuffer(4 + size + 4);
        buffer.writeBytes("RPC0".getBytes());
        int writerIndex = buffer.writerIndex();
        CodedOutputStream output = CodedOutputStream.newInstance(
                buffer.array(), buffer.writerIndex(), buffer.writableBytes() - 4);
        message.writeTo(output);
        output.checkNoSpaceLeft();

        buffer.writerIndex(writerIndex + size);
        Adler32 checksum = new Adler32();
View Full Code Here

Examples of org.jboss.netty.buffer.ChannelBuffer.array()

  {
    Object msgObj = e.getMessage();
    if (msgObj instanceof ChannelBuffer)
    {
      ChannelBuffer msgBuffer = (ChannelBuffer)msgObj;
      _msg = new String(msgBuffer.array());
    }
    super.messageReceived(ctx, e);
  }

  public String getMsg()
View Full Code Here

Examples of org.jboss.test.annotation.factory.support.Complex.array()

      assertEquals(987654321, complex.lng());
      assertEquals(123, complex.integer());
      assertEquals(true, complex.bool());
      assertEquals(Long.class, complex.clazz());
      assertEquals("Yes", complex.annotation().value());
      assertEquals(new String[]{"Test", "123"}, complex.array());
      assertEquals(MyEnum.TWO, complex.enumVal());
      assertArrays(new int[]{1, 2, 3}, complex.primitiveArray());
   }
  
   public void testComplexWithPropertyReplacement() throws Exception
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.