Package jodd.util.buffer

Examples of jodd.util.buffer.FastByteBuffer.toArray()


      byte[] encrypted = encryptBlock(block, 0);

      fbb.append(encrypted);
    }

    return fbb.toArray();
  }

  /**
   * Decrypts the whole content, block by block.
   */
 
View Full Code Here


      ndx--;
    }

    fbb.append(decrypted, 0, ndx);

    return fbb.toArray();
  }
 
}
View Full Code Here

  public void writeTo(Writer writer) throws IOException {
    for (Object o : list) {
      if (o instanceof FastByteBuffer) {
        FastByteBuffer fastByteBuffer = (FastByteBuffer) o;

        byte[] array = fastByteBuffer.toArray();

        writer.write(new String(array, StringPool.ISO_8859_1));
      }
      else if (o instanceof Uploadable) {
        Uploadable uploadable = (Uploadable) o;
View Full Code Here

  public void writeTo(OutputStream out) throws IOException {
    for (Object o : list) {
      if (o instanceof FastByteBuffer) {
        FastByteBuffer fastByteBuffer = (FastByteBuffer) o;

        out.write(fastByteBuffer.toArray());
      }
      else if (o instanceof Uploadable) {
        Uploadable uploadable = (Uploadable) o;

        InputStream inputStream = uploadable.openInputStream();
View Full Code Here

    // loop

    for (Object o : list) {
      if (o instanceof FastByteBuffer) {
        FastByteBuffer fastByteBuffer = (FastByteBuffer) o;
        byte[] bytes = fastByteBuffer.toArray();

        int offset = 0;

        while (offset < bytes.length) {
          // calc the remaining sending chunk size
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.