`

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 ?

    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 ...

    Engineering Software as a Service: An Agile Approach Using Cloud Computing

    Instead, our goal is to bring a diverse set of software engineering topics together into a single narrative, help readers understand the most important ideas through concrete examples and a learn-by-...

    Vibration Simulation Using Matlab and ANSYS

    It is also important to have a strong understanding of modal analysis, from which the total response of a system can be constructed. Finally, it helps to know how to take the results of large dynamic ...

    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 ...

    Game Programming Using QT(PACKT,2016)

    Using Qt and Qt Quick, it is easy to build fun games or shiny user interfaces. You only need to create your game once and deploy it on all major platforms like iOS, Android, and WinRT without ...

    Application Development with Parse using iOS SDK

    Parse using iOS SDK is a new technology, and is the first of its kind in the field of mobile application development. It provides you the cloud where you can keep your data, host your code, and even ...

    Big Data Analytics Using Splunk

    Big Data Analytics Using Splunk is a hands-on book showing how to process and derive business value from big data in real time. Examples in the book draw from social media sources such as Twitter ...

    Machine Learning Applications Using Python

    Machine Learning Applications Using Python is divided into three sections, one for each of the domains (healthcare, finance, and retail). Each section starts with an overview of machine learning and ...

    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 ...

    Building Trading Bots Using Java(Apress,2016)

    The central theme of Building Trading Bots Using Java is to create a framework that can facilitate automated trading on most of the brokerage platforms, with minimum changes. At the end of the journey...

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

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

    CodeHub is an iOS application written using Xamarin.zip

    CodeHub is an iOS application written using Xamarin

    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 ...

Global site tag (gtag.js) - Google Analytics