Examples of Buffer


Examples of org.pdfclown.bytes.Buffer

    // Instantiate a jpeg image object!
    Image image = null;
    try
    {
      image = Image.get(
        new Buffer(imageFileFormField.get())
        ); // Abstract image (entity).
    }
    catch(Exception e)
    {/* NOOP. */}
    if(image == null)
View Full Code Here

Examples of org.restlet.engine.io.Buffer

     * @param connection
     *            The parent SSL connection.
     */
    public WritableSslChannel(WritableSelectionChannel target,
            SslConnection<?> connection) {
        super(new Buffer(connection.getPacketBufferSize(), connection
                .getHelper().isDirectBuffers()), target);
        this.connection = connection;
    }
View Full Code Here

Examples of org.simpleframework.util.buffer.Buffer

    * @param array this is the array of bytes to be appended
    * @param off this is the start offset in the array to read from
    * @param len this is the number of bytes to write to the buffer
    */
   protected void append(byte[] array, int off, int len) throws IOException {
      Buffer buffer = allocate();

      if(buffer != null) {
         buffer.append(array, off, len);
      }
   }
View Full Code Here

Examples of org.vertx.java.core.buffer.Buffer

    setHeaders(resp, "text/plain", helloWorldContentLength);
    resp.end(helloWorldBuffer);
  }

  private void handleJson(HttpServerRequest req) {
    Buffer buff = new Buffer(Json.encode(Collections.singletonMap("message", "Hello, world!")));
    HttpServerResponse resp = req.response();
    setHeaders(resp, "application/json", String.valueOf(buff.length()));
    resp.end(buff);
  }
View Full Code Here

Examples of org.vngx.jsch.Buffer

   * @param I_C client key exchange initialization string
   * @return kex proposals or null if failure to guess
   * @throws KexException if algorithm negotiation fails
   */
  static KexProposal createProposal(final byte[] I_S, final byte[] I_C) throws KexException {
    Buffer serverBuffer = new Buffer(I_S)// Wrap in Buffers to easily
    Buffer clientBuffer = new Buffer(I_C)// read Strings
    serverBuffer.setOffSet(17)// Skip over message code and 16 bytes of
    clientBuffer.setOffSet(17)// random padding for each buffer

    List<String> serverProposals, clientProposals;
    KexProposal proposal = new KexProposal();
    for( Proposal p : Proposal.values() ) {
      // Parse out server and client proposal lists
      serverProposals = Arrays.asList(Util.split(Util.byte2str(serverBuffer.getString()), ","));
      clientProposals = Arrays.asList(Util.split(Util.byte2str(clientBuffer.getString()), ","));
      if( JSch.getLogger().isEnabled(Level.DEBUG) ) {
        JSch.getLogger().log(Level.DEBUG, "Kex: S proposes "+p+" -> "+serverProposals);
        JSch.getLogger().log(Level.DEBUG, "Kex: C proposes "+p+" -> "+clientProposals);
      }

View Full Code Here

Examples of org.vorbis.jcraft.jogg.Buffer

     *
     * @param op
     * @return
     */
    public int header_out(Packet op) {
        Buffer opb = new Buffer();
        opb.writeinit();

        if (pack(opb) != 0) {
            return OV_EIMPL;
        }

        op.packet_base = new byte[opb.bytes()];
        op.packet = 0;
        op.bytes = opb.bytes();
        System.arraycopy(opb.buffer(), 0, op.packet_base, 0, op.bytes);
        op.b_o_s = 0;
        op.e_o_s = 0;
        op.granulepos = 0;
        return 0;
    }
View Full Code Here

Examples of reactor.io.Buffer

    combined.writeBytes(partTwo);
    return combined;
  }

  private void passToConnection(ByteBuf data) {
    Buffer b = new Buffer(data.nioBuffer());
    int start = b.position();
    netChannel.read(b);
    data.skipBytes(b.position() - start);
  }
View Full Code Here

Examples of si.evil.server.Buffer

  @Override
  public void sendMessage(Target p, Message msg) {
    MConnection con = gplayers.get(p);
   
    Buffer tmp = new Buffer(msg.serialize(serializer));
   
    if(con!=null){
      con.sendMessage(tmp);
    }
  }
View Full Code Here

Examples of simtools.data.buffer.Buffer

            } catch (ClassNotFoundException cnfe2) {
                // continue to read the stream so it is not corrupted
            }
        }
        // If optional info is a buffer marker, take it in account
        Buffer buffer = null;
        if (BufferMarker.class.equals(option)) {
            try {
                buffer = (Buffer) in.readObject();
            } catch (ClassNotFoundException cnfe2) {
                // continue to read the stream so it is not corrupted
View Full Code Here

Examples of util.Buffer

            key = key.substring(0, i);
          }
         
          key = key.replaceAll("-", "");
         
          Buffer b = Hashing.HashMain.hashKey(0, 0, key);
          b.removeDWord()//length
          int prod = b.removeDWord()//Product
         
          cdkeys.add(new CDKey(key, prod, comment));
        }
      } catch(Exception e) {
        Out.info("KeyManager", "Couldn't parse cdkeys.txt line: " + key);
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.