Examples of Binary


Examples of javax.jcr.Binary

    @Test
    public void addBinaryProperty() throws RepositoryException, IOException {
        Node parentNode = getNode(TEST_PATH);
        InputStream is = new ByteArrayInputStream("foo\"".getBytes());
        Binary bin = getAdminSession().getValueFactory().createBinary(is);
        addProperty(parentNode, "binary", getAdminSession().getValueFactory().createValue(bin));
    }
View Full Code Here

Examples of javax.jcr.Binary

    @Test
    public void addSmallBinaryProperty() throws RepositoryException, IOException {
        Node parentNode = getNode(TEST_PATH);
        InputStream is = new NumberStream(1234);
        Binary bin = getAdminSession().getValueFactory().createBinary(is);
        addProperty(parentNode, "bigBinary", getAdminSession().getValueFactory().createValue(bin));
    }
View Full Code Here

Examples of net.sf.cb2java.types.Binary

        element = new Group(name, level, occurs);
    }
   
    private void createBinary()
    {
        element = new Binary(name, level, occurs, picture);
    }
View Full Code Here

Examples of nexj.core.util.Binary

      public void setBytes(int nParameterIndex, byte[] data) throws SQLException
      {
         int nOffset = initParam(nParameterIndex);

         m_paramArray[nOffset + PARAM_TYPE] = Primitive.BINARY;
         m_paramArray[nOffset + PARAM_VALUE] = (data == null) ? null : new Binary(data);
      }
View Full Code Here

Examples of org.apache.qpid.amqp_1_0.type.Binary

            props.setSubject(serverMessage.getRoutingKey());

            if(msgProps.hasUserId())
            {
                props.setUserId(new Binary(msgProps.getUserId()));
            }

            sections.add(props);

            if(msgProps.getApplicationHeaders() != null)
View Full Code Here

Examples of org.apache.qpid.amqp_1_0.type.Binary

        {
            try
            {
                if(RAW_LOGGER.isLoggable(Level.FINE))
                {
                    Binary bin = new Binary(buf.array(),buf.arrayOffset()+buf.position(), buf.limit()-buf.position());
                    RAW_LOGGER.fine("SEND["+ _conn.getRemoteAddress() +"] : " + bin.toString());
                }
                synchronized (_outputStream)
                {
                    _outputStream.write(buf.array(),buf.arrayOffset()+buf.position(), buf.limit()-buf.position());
                }
View Full Code Here

Examples of org.apache.qpid.amqp_1_0.type.Binary

            }
            return new AmqpValue(list);
        }
        else
        {
            return new Data(new Binary(data));

        }
    }
View Full Code Here

Examples of org.apache.qpid.amqp_1_0.type.Binary

    private static Object fixValue(final Object value)
    {
        if(value instanceof byte[])
        {
            return new Binary((byte[])value);
        }
        else if(value instanceof Map)
        {
            return fixMapValues((Map)value);
        }
View Full Code Here

Examples of org.apache.qpid.amqp_1_0.type.Binary

    {
        int headerSize = (int) metaData.getStorableSize();

        sectionEncoder.reset();
        sectionEncoder.encodeObject(bodySection);
        Binary dataEncoding = sectionEncoder.getEncoding();

        final ByteBuffer allData = ByteBuffer.allocate(headerSize + dataEncoding.getLength());
        metaData.writeToBuffer(0,allData);
        allData.put(dataEncoding.getArray(),dataEncoding.getArrayOffset(),dataEncoding.getLength());
        return allData;
    }
View Full Code Here

Examples of org.apache.qpid.amqp_1_0.type.Binary

                                                (String) ((AmqpValue)bodySection).getValue(), footer, _session);
            }
            else if(bodySection instanceof AmqpValue && ((AmqpValue)bodySection).getValue() instanceof Binary)
            {

                Binary value = (Binary) ((AmqpValue) bodySection).getValue();
                message = new BytesMessageImpl(header, messageAnnotations, properties, appProperties,
                                               new Data(value), footer, _session);
            }
            else if(bodySection instanceof Data)
            {
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.