Examples of array()


Examples of com.google.code.hs4j.network.buffer.IoBuffer.array()

    assertNotNull(buf);
    assertEquals(0, buf.position());
    assertTrue(buf.limit() > 0);

    assertEquals("P\t1\tmytest\tuser\tINDEX_1\tid,name,password\n",
        new String(buf.array(), 0, buf.limit()));

    IoBuffer buffer = IoBuffer.allocate(4);
    buffer.put("0\t1\n".getBytes());
    buffer.flip();
View Full Code Here

Examples of com.google.code.yanf4j.buffer.IoBuffer.array()

        Encoder encoder = this.codecFactory.getEncoder();
        Assert.assertNotNull(encoder);
        IoBuffer buffer = encoder.encode(IoBuffer.wrap("hello".getBytes("utf-8")), null);
        Assert.assertNotNull(buffer);
        Assert.assertTrue(buffer.hasRemaining());
        Assert.assertArrayEquals("hello".getBytes("utf-8"), buffer.array());

    }


    @Test
View Full Code Here

Examples of com.helger.jcodemodel.AbstractJType.array()

            constructor.body().assign(JExpr._this().ref(field), argument);
        }
        JVar param = interfaceMethod.listVarParam();
        if (param != null) {
            AbstractJType paramType = visitorInterface.substituteSpecialType(param.type().elementType(), usedValueClassType, usedValueClassType, types._RuntimeException);
            JFieldVar field = caseClass.field(JMod.PRIVATE | JMod.FINAL, paramType.array(), param.name());
            JVar argument = constructor.varParam(paramType, param.name());
            constructor.body().assign(JExpr._this().ref(field), argument);
        }

        JMethod acceptMethod = caseClass.method(JMod.PUBLIC, types._void, "accept");
View Full Code Here

Examples of com.ibm.icu.impl.ByteBuffer.array()

                    m_rules_ = elements.getString("Sequence");
                    ByteBuffer buf = elements.get("%%CollationBin").getBinary();
                    // %%CollationBin
                    if(buf!=null){
                    //     m_rules_ = (String)rules[1][1];
                        byte map[] = buf.array();
                        CollatorReader.initRBC(this, map);
                        /*
                        BufferedInputStream input =
                                                 new BufferedInputStream(
                                                    new ByteArrayInputStream(map));
View Full Code Here

Examples of com.strobel.assembler.metadata.Buffer.array()

        final Buffer code = new Buffer(codeSize);

        System.arraycopy(
            buffer.array(),
            codeOffset,
            code.array(),
            0,
            codeSize
        );

        _code = code;
View Full Code Here

Examples of com.sun.codemodel.JClass.array()

    Class<?> valueVectorClass = TypeHelper.getValueVectorClass(fieldId.getType().getMinorType(), fieldId.getType().getMode());
    JClass vvClass = model.ref(valueVectorClass);
    JClass retClass = vvClass;
    String vectorAccess = "getValueVector";
    if(fieldId.isHyperReader()){
      retClass = retClass.array();
      vectorAccess = "getValueVectors";
    }
   
    JVar vv = declareClassField("vv", retClass);
    JClass t = model.ref(SchemaChangeException.class);
View Full Code Here

Examples of com.sun.codemodel.JDefinedClass.array()

      if (isNested) {
        String nestedPacketName = "Nested" + name;
        JDefinedClass nestedClass = packetClass._class(JMod.FINAL | JMod.PUBLIC, nestedPacketName);
        processFields(nestedPacketName, field.getField(), nestedClass, codeModel, fromClient);
        fieldType = isArray ? nestedClass.array() : nestedClass;
      } else {
        fieldType = codeModel._ref(fieldClass);
      }

      JFieldVar packetField = packetClass.field(JMod.PRIVATE, fieldType, fieldName);
View Full Code Here

Examples of com.sun.codemodel.JType.array()

        JPrimitiveType prim = jt.boxify().getPrimitiveType();
        if(!typeUse.isCollection() && prim!=null)
            jt = prim;

        if(typeUse.isCollection())
            jt = jt.array();

        return jt;
    }

    public void annotate(JAnnotatable programElement) {
View Full Code Here

Examples of com.sun.codemodel.internal.JType.array()

        JPrimitiveType prim = jt.boxify().getPrimitiveType();
        if(!typeUse.isCollection() && prim!=null)
            jt = prim;

        if(typeUse.isCollection())
            jt = jt.array();

        return jt;
    }

    public void annotate(JAnnotatable programElement) {
View Full Code Here

Examples of com.taobao.gecko.core.buffer.IoBuffer.array()

    @Test
    public void testMakeHead() throws Exception {
        final IoBuffer head = this.fileMessageSet.makeHead(-1999, 100);
        assertEquals(0, head.position());
        assertTrue(head.hasRemaining());
        assertEquals("value 100 -1999\r\n", new String(head.array()));
    }


    @Test
    public void testSlice() 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.