索引
- PersistentCategoryKeyValueContent
- ITreeContent
- ItemContent
- InstantaneousTreeContent
- ICodedTreeContent
- IKeyValueContent
- InstantaneousCodedTreeContent
- InstantaneousKeyValueContent
- IGlobalizationContent
- EntityUtil
- EntityStore
- ICategoryTreeContent
- ICategoryKeyValueContent
- ICodedCategoryTreeContent
- EntityJoin
- EntityCapsule
- CacheKeyValueContent
- CacheTreeContent
- ClassContent
- ProxySupport
- CacheCodedTreeContent
- Business
- ValidationSupport
- Validation
- IFinallyAspect
- Intercept
- InvokeContext
- IProxyLoader
- ProxyFactory
- IAspect
- IAroundAspect
- FinallyAspectSupport
- AroundAspectSupport
- AOPUnknownBreak
- AOPBreak
- AOPTransactionBreak
- GridView
- JSONOut
- Galleria
- package-frame
- package-summary
- package-tree
- package-use
- LoginSessionListener
- ApplicationContextListener
- TransactionFilter
- FileUploader.FileUploaderStatus
- FileUploader
- CharacterEncodingFilter
- ImageRedirectFilter
- FileUploader.FileUploaderListener
- PrintWriterDecorator
- IFormatter
- TokenPool
- HttpServletResponseDecorator
- HttpServletRequestDecorator
- ICryptography
- DynamicSecret
- CryptographySupport
- OrmTransactionContext
- OrmPersistenceFactory
- OrmPersistenceCollection
- CryptographyFactory
- OrmContexts
- OrmDatabaseTransaction
- OrmDefinitionContext
- OrmManipulationQueryContext
- OrmPersistence
- IOrmPersistence
- IOrmManipulationQuery
- IOrmTransaction
- Order
- OrmConstant
- IOrmDefinition
- DatabaseHelperSupport
- Entity
- FieldProperty
- Fields
- XMLFormatter
- SetList
- AggregateField
- Condition
- DatabaseHelper
- JSONFormatter
- ISetList
- MapList
- Names
- NameValue
- ServiceRouter
- StreamView
- TextView
- XMLView
- IMapList
- ServiceController
- RouterSupport
- Router
- RedirectView
- MVCRenderException
- MVCNotFoundException
- MVCInternalException
- JSPRouter
- JSPView
- Model
- MVCException
- MVCInstantiationException
- IModel
- IRouter
- IView
- JSONView
- JSPController
- ImageView
- IController
- HTMLView
- ForwardView
- Controller
- MailSender
- RandomGenerator
- ReflectionUtil
- ReservedWord
- QRCode
- LoggerSupport
- ChinesePinYin
- HttpExecuter
- IdCardValidator
- ImageValidateCode
- User32.RECT
- User32.SIZE
- KCLInformation
- IAppender
- Logger
- User32.POINT
- User32
- Identify
- FacadeDirectory
- FacadeIO
- TextReader
- TextWriter
- LocalizationLanguage
- Convert
- Comments
- WinFormInstallationBuilder
- WebFormInstallationBuilder
- PersistentTreeContent
- ServiceBusiness
- TreeContent
- CallingOnly
- CodeBuilder
- PersistentCategoryTreeContent
- PersistentCodedCategoryTreeContent
- PersistentCodedTreeContent
- PersistentGlobalizationContent
- PersistentKeyValueContent
- XMLDocumentEx
- WxOAuthAdapter
- WxPayAdapter
- WxSupport
- KCLConfig
- XMLDocument
- WxOAthAdapter
- WxAdapterSupport
- WxBasicAdapter
- WxMenuAdapter
- WxMessageDispatcher
- IWxReceivedListener
- TreeNode
- TreeLeaf
- Tree
- Train
- IWxEventListener
- ITreeNode
- MapQueue
- DateTime
- Forest
- ICache
- IMapQueue
- ThreadUnsafe
- UnimplementedException
- Untested
- ThreadSafe
- Cache
- MultiThreadUnitTest
- Debugger
- IUnitTest
- UnitTest
- Tested
- UploadView
- TreeView
- Paging
- StringHelper
- RichText
- Video
- Music
- ListView
- Label
- KCLTag
com.knots.kcl.misc
Class HttpExecuter
java.lang.Object com.knots.kcl.misc.HttpExecuter
public class HttpExecuter
- extends java.lang.Object
Http Executer
Field Summary | |
---|---|
static int | GET_METHOD |
static int | POST_METHOD |
Constructor Summary | |
---|---|
HttpExecuter(java.lang.String url, int method) Start a http url connection | |
HttpExecuter(java.lang.String url, int method, byte[] data) Start a http url connection |
Method Summary | |
---|---|
static java.lang.String | get(java.lang.String url) start a get http request. |
static java.lang.String | post(java.lang.String url) start a post http request. |
static java.lang.String | post(java.lang.String url, byte[] data) start a post http request with specified data. |
static java.lang.String | post(java.lang.String url, java.lang.String text) start a post http request with specified text. |
java.awt.image.BufferedImage | readImage() Read buffered image for result. |
java.io.OutputStream | readStream(java.io.OutputStream stream) Read result binary to a stream then return itself. |
java.lang.String | readText() Read text string for result. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
GET_METHOD
public static final int GET_METHOD
- See Also:
- Constant Field Values
POST_METHOD
public static final int POST_METHOD
- See Also:
- Constant Field Values
Constructor Detail |
---|
HttpExecuter
public HttpExecuter(java.lang.String url, int method) throws java.io.IOException
- Start a http url connection
- Parameters:
url
- url of connectionmethod
- GET_METHOD for get request or POST_METHOD for post request.- Throws:
java.io.IOException
HttpExecuter
public HttpExecuter(java.lang.String url, int method, byte[] data) throws java.io.IOException
- Start a http url connection
- Parameters:
url
- url of connectionmethod
- GET_METHOD for get request or POST_METHOD for post request.data
- data need to be post. Note: method 'GET' is not support for this parameter.- Throws:
java.io.IOException
Method Detail |
---|
readText
public java.lang.String readText() throws java.io.IOException
- Read text string for result.
- Throws:
java.io.IOException
readImage
public java.awt.image.BufferedImage readImage() throws java.io.IOException
- Read buffered image for result.
- Throws:
java.io.IOException
readStream
public java.io.OutputStream readStream(java.io.OutputStream stream) throws java.io.IOException
- Read result binary to a stream then return itself.
- Throws:
java.io.IOException
get
public static java.lang.String get(java.lang.String url) throws java.io.IOException
- start a get http request.
- Throws:
java.io.IOException
post
public static java.lang.String post(java.lang.String url) throws java.io.IOException
- start a post http request.
- Throws:
java.io.IOException
post
public static java.lang.String post(java.lang.String url, byte[] data) throws java.io.IOException
- start a post http request with specified data.
- Throws:
java.io.IOException
post
public static java.lang.String post(java.lang.String url, java.lang.String text) throws java.io.IOException
- start a post http request with specified text.
- Throws:
java.io.IOException