Examples of toBytes()


Examples of org.apache.phoenix.schema.PIndexState.toBytes()

        if (ptr.getLength() == 0) {
            return true;
        }
        byte serializedByte = ptr.get()[ptr.getOffset()];
        PIndexState indexState = PIndexState.fromSerializedValue(serializedByte);
        ptr.set(indexState.toBytes());
        return true;
    }

    @Override
    public PDataType getDataType() {
View Full Code Here

Examples of org.apache.pig.LoadStoreCaster.toBytes()

    @SuppressWarnings("unchecked")
    private byte[] objToBytes(Object o, byte type) throws IOException {
        LoadStoreCaster caster = (LoadStoreCaster) caster_;
        switch (type) {
        case DataType.BYTEARRAY: return ((DataByteArray) o).get();
        case DataType.BAG: return caster.toBytes((DataBag) o);
        case DataType.CHARARRAY: return caster.toBytes((String) o);
        case DataType.DOUBLE: return caster.toBytes((Double) o);
        case DataType.FLOAT: return caster.toBytes((Float) o);
        case DataType.INTEGER: return caster.toBytes((Integer) o);
        case DataType.LONG: return caster.toBytes((Long) o);
View Full Code Here

Examples of org.apache.shindig.gadgets.rewrite.image.BaseOptimizer.ImageIOOutputter.toBytes()

   */
  private HttpResponse updateResponse(HttpResponse response, BufferedImage image)
      throws IOException {
    ImageWriter imageWriter = ImageIO.getImageWritersByFormatName(RESIZE_OUTPUT_FORMAT).next();
    ImageOutputter outputter = new ImageIOOutputter(imageWriter, null);
    byte[] imageBytes = outputter.toBytes(image);
    HttpResponseBuilder newResponseBuilder = new HttpResponseBuilder(response)
        .setResponse(imageBytes)
        .setHeader(CONTENT_TYPE, CONTENT_TYPE_IMAGE_PNG)
        .setHeader(CONTENT_LENGTH, String.valueOf(imageBytes.length));
    return newResponseBuilder.create();
View Full Code Here

Examples of org.apache.shindig.gadgets.rewrite.image.BaseOptimizer.ImageOutputter.toBytes()

   */
  private HttpResponse updateResponse(HttpResponse response, BufferedImage image)
      throws IOException {
    ImageWriter imageWriter = ImageIO.getImageWritersByFormatName(RESIZE_OUTPUT_FORMAT).next();
    ImageOutputter outputter = new ImageIOOutputter(imageWriter, null);
    byte[] imageBytes = outputter.toBytes(image);
    HttpResponseBuilder newResponseBuilder = new HttpResponseBuilder(response)
        .setResponse(imageBytes)
        .setHeader(CONTENT_TYPE, CONTENT_TYPE_IMAGE_PNG)
        .setHeader(CONTENT_LENGTH, String.valueOf(imageBytes.length));
    return newResponseBuilder.create();
View Full Code Here

Examples of org.apache.tajo.storage.RowStoreUtil.RowStoreEncoder.toBytes()

                                 TupleRange range, boolean last) throws IOException {
    Map<String,List<String>> kvs = Maps.newHashMap();
    RowStoreEncoder encoder = RowStoreUtil.createEncoder(keySchema);
    kvs.put("start", Lists.newArrayList(
        new String(Base64.encodeBase64(
            encoder.toBytes(range.getStart()),
            false))));
    kvs.put("end", Lists.newArrayList(
        new String(Base64.encodeBase64(
            encoder.toBytes(range.getEnd()), false))));
View Full Code Here

Examples of org.apache.tomcat.util.buf.MessageBytes.toBytes()

    protected boolean authenticate(Request request, Response response, LoginConfig config)
            throws IOException {
        MessageBytes authorization =
            request.getCoyoteRequest().getMimeHeaders().getValue("authorization");
        if (authorization != null) {
            authorization.toBytes();
            ByteChunk authorizationBC = authorization.getByteChunk();
            if (authorizationBC.startsWithIgnoreCase("basic ", 0)) {
                return bc.authenticate(request, response, config);
            }
            else if (authorizationBC.startsWithIgnoreCase("oauth ", 0)) {
View Full Code Here

Examples of org.apache.tomcat.util.buf.MessageBytes.toBytes()

        MessageBytes authorization =
            request.getCoyoteRequest().getMimeHeaders()
            .getValue("authorization");
       
        if (authorization != null) {
            authorization.toBytes();
            ByteChunk authorizationBC = authorization.getByteChunk();
            if (authorizationBC.startsWithIgnoreCase("basic ", 0)) {
                authorizationBC.setOffset(authorizationBC.getOffset() + 6);
                // FIXME: Add trimming
                // authorizationBC.trim();
View Full Code Here

Examples of org.apache.tomcat.util.buf.MessageBytes.toBytes()

        MessageBytes authorization =
            request.getCoyoteRequest().getMimeHeaders()
            .getValue("authorization");
       
        if (authorization != null) {
            authorization.toBytes();
            ByteChunk authorizationBC = authorization.getByteChunk();
            if (authorizationBC.startsWithIgnoreCase("basic ", 0)) {
                authorizationBC.setOffset(authorizationBC.getOffset() + 6);
                // FIXME: Add trimming
                // authorizationBC.trim();
View Full Code Here

Examples of org.apache.tomcat.util.buf.MessageBytes.toBytes()

      MessageBytes authorization =
          request.getCoyoteRequest().getMimeHeaders()
          .getValue("authorization");
     
      if (authorization != null) {
          authorization.toBytes();
          ByteChunk authorizationBC = authorization.getByteChunk();
          if (authorizationBC.startsWithIgnoreCase("basic ", 0)) {
              authorizationBC.setOffset(authorizationBC.getOffset() + 6);
              // FIXME: Add trimming
              // authorizationBC.trim();
View Full Code Here

Examples of org.apache.tomcat.util.buf.MessageBytes.toBytes()

        MessageBytes authorization =
            request.getCoyoteRequest().getMimeHeaders()
            .getValue("authorization");

        if (authorization != null) {
            authorization.toBytes();
            ByteChunk authorizationBC = authorization.getByteChunk();
            if (authorizationBC.startsWithIgnoreCase("basic ", 0)) {
                authorizationBC.setOffset(authorizationBC.getOffset() + 6);
                // FIXME: Add trimming
                // authorizationBC.trim();
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.