code: public static HttpEntity newBufferedHttpEntity(HttpEntity entity) throws
              FakeIOException {
          try {
              return new BufferedHttpEntity(entity);
          } catch (FakeIOException e) {
              // Only for test simulation.
              throw e;
          } catch (IOException e) {
              throw new SdkClientException("Unable to create HTTP entity: " + e.getMessage(), e);
          }
      }
docs: Utility function for creating a new BufferedEntity and wrapping any errors
  as a SdkClientException.
  
  @param entity The HTTP entity to wrap with a buffered HTTP entity.
  @return A new BufferedHttpEntity wrapping the specified entity.
  @throws FakeIOException only for test simulation