Package org.persvr.data

Examples of org.persvr.data.BinaryData


    case HEADER_BINARY:
    case HEADER_BIG_STRING:
      long fileId = readVarLong(input);
      BinaryData.InputStreamSource inputSource = readFile(fileId);
      if (header == HEADER_BINARY)
        return new BinaryData(inputSource);
      return IOUtils.toString(inputSource.getStream(), "UTF-8");
    case HEADER_UNDEFINED:
      return Undefined.instance;
    case HEADER_END:
      return END_OF_LIST;
View Full Code Here


        fileTarget.set("content", IOUtils.toString(new InputStreamReader((InputStream) data, charSet == null ? "UTF-8" : charSet)));
      else
        fileTarget.set("content", new String((byte[]) data, charSet == null ? "UTF-8" : charSet));
    } else {
      if (data instanceof InputStream)
        fileTarget.set("content", new BinaryData((InputStream) data));
      else
        fileTarget.set("content", new BinaryData((byte[]) data));
    }
    return fileTarget;
  }
View Full Code Here

          throw new RuntimeException(e);
        }
          }
          if (value.startsWith(BINARY_HEADER)) {
            value = value.substring(BINARY_HEADER.length());
        return new BinaryData(Base64.decodeBase64(value.getBytes()));
          }
          if (value.equals(UNDEFINED)) {
              return Undefined.instance;
          }
          if (BOOLEAN_FALSE.equals(value))
View Full Code Here

TOP

Related Classes of org.persvr.data.BinaryData

Copyright © 2018 www.massapicom. 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.