Package com.cedarsoft.couchdb.core

Examples of com.cedarsoft.couchdb.core.ActionResponse


    try {
      //Wrap the input stream
      try ( MaxLengthByteArrayOutputStream teedOut = new MaxLengthByteArrayOutputStream(); TeeInputStream teeInputStream = new TeeInputStream( entityInputStream, teedOut ) ) {
        UniqueId uniqueId = deserialize( teeInputStream );

        return new ActionResponse( uniqueId, response.getStatus(), response.getLocation(), teedOut.toByteArray() );
      }
    } catch ( IOException e ) {
      throw new RuntimeException( e );
    }
  }
View Full Code Here


    if ( LOG.isLoggable( Level.FINE ) ) {
      LOG.fine( "PUT " + path.toString() );
    }

    ClientResponse clientResponse = path.type( JSON_TYPE ).accept( JSON_TYPE ).put( ClientResponse.class, couchDocSerializer.serialize( doc, serializer ) );
    ActionResponse actionResponse = ActionResponseSerializer.create( clientResponse );

    //Update the rev
    doc.setRev( actionResponse.getRev() );

    return actionResponse;
  }
View Full Code Here

TOP

Related Classes of com.cedarsoft.couchdb.core.ActionResponse

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.