`

Using getResponseBodyAsStream instead is recommended

阅读更多

转载自     萝卜家族的栋梁萝卜     http://sinyu.spaces.live.com/?_c11_BlogPart_blogpart=blogview&_c=BlogPart&partqs=amonth%3d10%26ayear%3d2006

第一,超简单的使用httpclient的GetMethod,总是挑出饶人的警告信息:
Oct 30, 2006 12:21:42 AM org.apache.commons.httpclient.HttpMethodBase getResponseBody WARNING: Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended.
程序太简单还要为logging加个properties觉得麻烦,就google到了下面的办法,代码中加入下面几行代码就可以了:
System.setProperty(
"org.apache.commons.logging.Log",
"org.apache.commons.logging.impl.SimpleLog");
System.setProperty(
"org.apache.commons.logging.simplelog.showdatetime",
"true");
System.setProperty(
"org.apache.commons.logging" +
".simplelog.log.org.apache.commons.httpclient",
"error");

Java可以通过java.util.Locale.setDefault来设置Locale,这样貌似比在Linux上设置语言环境变量要靠铺一些,至少感觉专业一些吧,赫赫.

分享到:
评论

相关推荐

    Who Is Using My WIFI

    标题中的"Who Is Using My WIFI"直译为“谁在使用我的WIFI”,这是一款网络监控工具,旨在帮助用户识别并管理连接到其WIFI网络的设备。在现代生活中,WIFI已经成为家庭和办公室网络连接的主要方式,但这也意味着网络...

    Numerical Methods: Using MATLAB, 4th Edition

    By using MATLAB® it is possible for the readers to tackle some large and difficult problems and deepen and consolidate their understanding of problem solving using numerical methods. Many worked ...

    OpenGL的应用

    基于android平台开发的应用,主要是OpenGL的应用。

    PLC Communication Using .NET C# sample

    For a basic understanding of what PLC is, use Google because basically I am not a PLC Engineer or Electrical Engineer, but I will explain to you how to connect PLC using .NET programs, how to read ...

    Learning Robotics using Python(PACKT,2015)

    Learning Robotics Using Python is an essential guide for creating an autonomous mobile robot using popular robotic software frameworks such as ROS using Python. It also discusses various robot ...

    Introduction to Finite Element Analysis Using MATLAB and Abaqus

    implementation and as its application using commercial software. The computer implementation is carried out using MATLAB, while the practical applications are carried out in both MATLAB and Abaqus. ...

    DESIGNING STEGANOGRAPHIC DISTORTION USING DIRECTIONAL FILTERS

    one pixel is weighted and then aggregated using the reciprocal Hölder norm to define the individual pixel costs. In contrast to other adaptive embedding schemes, the aggregation rule is designed to ...

    Writing testbenches using SystemVerilog pdf

    It is not that they are not important. SystemVerilog includes constructs and semantics for writing assertions and coverage properties using temporal expressions. Formal verification is already an ...

    The Django Base Site is a Django site that is built using the be

    The Django Base Site is a Django site that is built using the best Django practices and comes with all the common Django packages that yo…

    Designing Object-Oriented C++ Applications-Using the Booch Method

    A practical, problem-solving approach to the fundamental concepts of Object Oriented Design and their application using C++. This book is written for the "engineer in the trenches". It is a serious ...

    Learning robotics using python

    Even though robotics is a complex subject, several other tools along with Python can help you design a project to create an easy-to-use interface., Learning Robotics Using Python is an essential ...

    Learning iOS 8 Game Development Using Swift pdf 2015

    This book is for novices as well as proficient game developers who want to learn more about game development using Swift. If you are from a 2D game development background and would like to learn the ...

    C#中is,as,using关键字的使用说明

    在C#中is,as,using关键字具有其特点及使用场景,其中is关键字用于检查该对象是否与给定类型兼容,as关键字用于将对象转换为指定类型,using关键字除了用于引入命名空间之外,还具有回收对象资源,如文件资源、网络...

    Learning Robotics Using Python

    Even though robotics is a complex subject, several other tools along with Python can help you design a project to create an easy-to-use interface., Learning Robotics Using Python is an essential ...

    Learning Robotics using Python

    Even though robotics is a complex subject, several other tools along with Python can help you design a project to create an easy-to-use interface., Learning Robotics Using Python is an essential ...

    APPLIED NUMERICAL METHODS USING MATLAB.pdf

    know how to define the problems they want to solve using MATLAB and how to use the corresponding routines to solve their problems. We never deny that detailed knowledge about the algorithm (engine) of...

Global site tag (gtag.js) - Google Analytics