Android SessionOutputBuffer - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android SessionOutputBuffer class.

This code example shows how to use the following methods: flush, write, writeLine
    protected void flushCacheWithAppend(byte bufferToAppend[], int off, int len) throws IOException { 
        this.out.writeLine(Integer.toHexString(this.cachePosition + len)); 
        this.out.write(this.cache, 0, this.cachePosition); 
        this.out.write(bufferToAppend, off, len); 
        this.out.writeLine(""); 
        this.cachePosition = 0; 
    } 
 
    protected void writeClosingChunk() throws IOException { 
        // Write the final chunk. 
        this.out.writeLine("0"); 
        this.out.writeLine(""); 
    } 
 
    // ----------------------------------------------------------- Public Methods 
    /** 
     * Must be called to ensure the internal cache is flushed and the closing 
     * chunk is written. 
     * @throws IOException in case of an I/O error 
     */ 

6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: flush
                request,
                request.getEntity());
    } 
 
    protected void doFlush() throws IOException { 
        this.outbuffer.flush();
    } 
     
    public void flush() throws IOException { 
        assertOpen(); 
        doFlush(); 
    } 
     
    public HttpResponse receiveResponseHeader() 
            throws HttpException, IOException { 
        assertOpen(); 
        HttpResponse response = (HttpResponse) this.responseParser.parse();
        if (response.getStatusLine().getStatusCode() >= 200) {
            this.metrics.incrementResponseCount();
        } 
Full Snippet Info
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: flush
     * will invoke {@link #init(SessionInputBuffer, SessionOutputBuffer, HttpParams)} 
     * method to pass references to those buffers to the underlying HTTP message 
     * parser and formatter. 
     * <p> 
     * After this method's execution the connection status will be reported 
     * as open and the {@link #isOpen()} will return <code>true</code>. 
     * 
     * @param socket the socket. 
     * @param params HTTP parameters. 
     * @throws IOException in case of an I/O error. 
     */ 
    protected void bind(final Socket socket, final HttpParams params) throws IOException {
        if (socket == null) {
            throw new IllegalArgumentException("Socket may not be null");
        } 
        if (params == null) {
            throw new IllegalArgumentException("HTTP parameters may not be null");
        } 
        this.socket = socket;
 
Full Snippet Info
4
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: flush
    public void close() throws IOException { 
        if (!this.closed) {
            this.closed = true;
            this.out.flush();
        } 
    } 
 
    @Override 
    public void flush() throws IOException { 
        this.out.flush();
    } 
 
    @Override 
    public void write(final byte[] b, final int off, final int len) throws IOException {
        if (this.closed) {
            throw new IOException("Attempted write to closed stream.");
        } 
        if (this.total < this.contentLength) {
            final long max = this.contentLength - this.total;
            int chunk = len;
Full Snippet Info
4
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: flush
 
    @Override 
    protected SessionInputBuffer createSessionInputBuffer(
            final Socket socket,
            int buffersize,
            final HttpParams params) throws IOException {
        SessionInputBuffer inbuffer = super.createSessionInputBuffer(
                socket, 
                buffersize,
                params);
        if (wireLog.isDebugEnabled()) {
            inbuffer = new LoggingSessionInputBuffer(inbuffer, new Wire(wireLog));
        } 
        return inbuffer;
    } 
 
     
    @Override 
    protected SessionOutputBuffer createSessionOutputBuffer(
            final Socket socket,
Full Snippet Info
4
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE

Related Android SessionOutputBuffer Questions & Answers:

See Code Examples for Android SessionOutputBuffer Methods: