signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class MCWrapper { /** * Called by the Connection manager during reassociate to check if an unshared connection
* is currently involved in a transaction . */
protected boolean involvedInTransaction ( ) { } } | final boolean isTracingEnabled = TraceComponent . isAnyTracingEnabled ( ) ; if ( state == STATE_TRAN_WRAPPER_INUSE ) { if ( isTracingEnabled && tc . isDebugEnabled ( ) ) { Tr . debug ( this , tc , "involvedInTransaction: true" ) ; } return true ; } else { if ( isTracingEnabled && tc . isDebugEnabled ( ) ) { Tr . debug ... |
public class TimeMeasure { /** * Calls { @ link # failIfNotSucceeded ( ) } and the logs the status and { @ link # getDurationAsString ( ) duration } of this
* measure .
* @ param logger is the { @ link Logger } .
* @ param operation represents the operation that was measured . Typically a { @ link String } . Its ... | if ( ! isCompleted ( ) ) { failIfNotSucceeded ( ) ; } if ( isFailure ( ) ) { logger . warn ( "Operation {} failed after duration of {}" , operation , getDurationAsString ( ) ) ; } else { logger . info ( "Operation {} succeeded after duration of {}" , operation , getDurationAsString ( ) ) ; } |
public class GBSDeleteFringe { /** * Handle the case where we deleted from a left fringe . */
private void leftFringe ( DeleteStack . Linearizer lxx , DeleteStack . FringeNote xx , InsertStack istack , GBSNode f , GBSNode g , boolean gLeft , int t0_depth ) { } } | GBSNode w = f . rightChild ( ) ; /* The right brother of delete fringe */
GBSNode s = f . leftChild ( ) ; /* t0 fringe from which we deleted */
GBSNode bfather = g ; GBSNode sh = null ; /* The linearized s */
GBSNode p = null ; int fbalance = f . balance ( ) ; f . clearBalance ( ) ; if ( w == null ) /* There is no righ... |
public class StringUtils { /** * Reads the contents of a file into a string using the UTF - 8 character set encoding .
* @ param aFile The file from which to read
* @ return The information read from the file
* @ throws IOException If the supplied file could not be read */
public static String read ( final File a... | String string = new String ( readBytes ( aFile ) , StandardCharsets . UTF_8 . name ( ) ) ; if ( string . endsWith ( EOL ) ) { string = string . substring ( 0 , string . length ( ) - 1 ) ; } return string ; |
public class ModuleDepInfo { /** * Adds the terms and comments from the specified object to this object .
* @ param other
* The object to add
* @ return True if this object was modified */
public boolean add ( ModuleDepInfo other ) { } } | Boolean modified = false ; if ( formula . isTrue ( ) ) { // No terms added to a true formula will change the evaluation .
return false ; } if ( other . formula . isTrue ( ) ) { // Adding true to this formula makes this formula true .
modified = ! formula . isTrue ( ) ; formula = new BooleanFormula ( true ) ; if ( modif... |
public class DateMapperBuilder { /** * Returns the { @ link DateMapper } represented by this { @ link MapperBuilder } .
* @ param field the name of the field to be built
* @ return the { @ link DateMapper } represented by this */
@ Override public DateMapper build ( String field ) { } } | return new DateMapper ( field , column , validated , pattern ) ; |
public class AbstractResourceBundleHandler { /** * Creates a file . If dir is not created for some reason a runtimeexception
* is thrown .
* @ param path
* @ return
* @ throws IOException */
private File createNewFile ( String path ) throws IOException { } } | // In windows , pathnames with spaces are returned as % 20
if ( path . contains ( "%20" ) ) path = path . replaceAll ( "%20" , " " ) ; File newFile = new File ( path ) ; if ( ! newFile . exists ( ) && ! newFile . createNewFile ( ) ) { throw new BundlingProcessException ( "Unable to create a temporary file at " + path )... |
public class DialectFactory { /** * 通过JDBC URL等信息识别JDBC驱动名
* @ param nameContainsProductInfo 包含数据库标识的字符串
* @ return 驱动 */
public static String identifyDriver ( String nameContainsProductInfo ) { } } | if ( StrUtil . isBlank ( nameContainsProductInfo ) ) { return null ; } // 全部转为小写 , 忽略大小写
nameContainsProductInfo = StrUtil . cleanBlank ( nameContainsProductInfo . toLowerCase ( ) ) ; String driver = null ; if ( nameContainsProductInfo . contains ( "mysql" ) ) { driver = ClassLoaderUtil . isPresent ( DRIVER_MYSQL_V6 ) ... |
public class WebACRolesProvider { /** * This maps a Collection of acl : agentGroup values to a List of agents .
* Any out - of - domain URIs are silently ignored . */
private List < String > dereferenceAgentGroups ( final Collection < String > agentGroups ) { } } | final FedoraSession internalSession = sessionFactory . getInternalSession ( ) ; final IdentifierConverter < Resource , FedoraResource > translator = new DefaultIdentifierTranslator ( getJcrSession ( internalSession ) ) ; final List < String > members = agentGroups . stream ( ) . flatMap ( agentGroup -> { if ( agentGrou... |
public class TypeUtil { public static void toHex ( byte b , Appendable buf ) { } } | try { int bi = _0XFF & b ; int c = '0' + ( bi / SIXTEEN ) % SIXTEEN ; if ( c > '9' ) { c = 'A' + ( c - '0' - TEN ) ; } buf . append ( ( char ) c ) ; c = '0' + bi % SIXTEEN ; if ( c > '9' ) { c = 'A' + ( c - '0' - TEN ) ; } buf . append ( ( char ) c ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; } |
public class InternalUtilities { /** * Get input content source .
* @ param conf job configuration
* @ param host host to connect to
* @ return content source
* @ throws IOException
* @ throws XccConfigException */
public static ContentSource getInputContentSource ( Configuration conf , String host ) throws X... | String user = conf . get ( INPUT_USERNAME , "" ) ; String password = conf . get ( INPUT_PASSWORD , "" ) ; String port = conf . get ( INPUT_PORT , "8000" ) ; String db = conf . get ( INPUT_DATABASE_NAME ) ; int portInt = Integer . parseInt ( port ) ; boolean useSsl = conf . getBoolean ( INPUT_USE_SSL , false ) ; if ( us... |
public class ArgumentParser { /** * Handle the - - uninstall argument */
private void handleArgUninstall ( final String arg , final Deque < String > args ) { } } | install = true ; String name = arg ; final int posEq = name . indexOf ( "=" ) ; String value ; if ( posEq != - 1 ) { value = name . substring ( posEq + 1 ) ; } else { value = args . peek ( ) ; if ( value != null && ! value . startsWith ( "-" ) ) { value = args . pop ( ) ; } else { value = null ; } } if ( value == null ... |
public class Maths { /** * Calculates the factorial of n where n is a number in the
* range 0 - 20 . Zero factorial is equal to 1 . For values of
* n greater than 20 you must use { @ link # bigFactorial ( int ) } .
* @ param n The factorial to calculate .
* @ return The factorial of n .
* @ see # bigFactorial... | if ( n < 0 || n > MAX_LONG_FACTORIAL ) { throw new IllegalArgumentException ( "Argument must be in the range 0 - 20." ) ; } long factorial = 1 ; for ( int i = n ; i > 1 ; i -- ) { factorial *= i ; } return factorial ; |
public class CleverTapAPI { /** * Push */
private void cacheFCMToken ( String token ) { } } | try { if ( token == null || alreadyHaveFCMToken ( token ) ) return ; final SharedPreferences prefs = getPreferences ( ) ; if ( prefs == null ) return ; SharedPreferences . Editor editor = prefs . edit ( ) ; editor . putString ( storageKeyWithSuffix ( Constants . FCM_PROPERTY_REG_ID ) , token ) ; StorageHelper . persist... |
public class Builder { /** * < b > Required Field < / b > . Distribution tag listing the distributable package .
* @ param distribution the distribution . */
public void setDistribution ( final CharSequence distribution ) { } } | if ( distribution != null ) format . getHeader ( ) . createEntry ( DISTRIBUTION , distribution ) ; |
public class Channel { /** * Query namespaces . Takes no specific arguments returns namespaces including chaincode names that have been committed .
* @ param queryNamespaceDefinitionsRequest the request see { @ link LifecycleQueryNamespaceDefinitionsRequest }
* @ param peers to send the request .
* @ return A { @... | if ( null == queryNamespaceDefinitionsRequest ) { throw new InvalidArgumentException ( "The queryNamespaceDefinitionsRequest parameter can not be null." ) ; } checkChannelState ( ) ; checkPeers ( peers ) ; try { logger . trace ( format ( "lifecycleQueryNamespaceDefinitions channel: %s" , name ) ) ; TransactionContext c... |
public class DebugHelper { /** * This method will append to the pdf a legend explaining the visual feedback in the pdf , an overview of the styles
* used and an overview of the properties used .
* @ throws DocumentException */
public static void appendDebugInfo ( PdfWriter writer , Document document , EnhancedMap s... | PdfContentByte canvas = writer . getDirectContent ( ) ; canvas . setFontAndSize ( FontFactory . getFont ( FontFactory . COURIER ) . getBaseFont ( ) , 8 ) ; canvas . setColorFill ( itextHelper . fromColor ( settings . getColorProperty ( Color . MAGENTA , ReportConstants . DEBUGCOLOR ) ) ) ; canvas . setColorStroke ( ite... |
public class Code { /** * Awaits the lock on { @ code monitor } , and acquires it . */
public void monitorEnter ( Local < ? > monitor ) { } } | addInstruction ( new ThrowingInsn ( Rops . MONITOR_ENTER , sourcePosition , RegisterSpecList . make ( monitor . spec ( ) ) , catches ) ) ; |
public class JstlLocalization { /** * Looks up a configuration variable in the request , session and application scopes . If none is found , return by
* { @ link ServletContext # getInitParameter ( String ) } method . */
private Object findByKey ( String key ) { } } | Object value = Config . get ( request , key ) ; if ( value != null ) { return value ; } value = Config . get ( request . getSession ( createNewSession ( ) ) , key ) ; if ( value != null ) { return value ; } value = Config . get ( request . getServletContext ( ) , key ) ; if ( value != null ) { return value ; } return r... |
public class CFMLEngineFactorySupport { /** * cast a lucee string version to a int version
* @ param version
* @ return int version */
public static Version toVersion ( String version , final Version defaultValue ) { } } | // remove extension if there is any
final int rIndex = version . lastIndexOf ( ".lco" ) ; if ( rIndex != - 1 ) version = version . substring ( 0 , rIndex ) ; try { return Version . parseVersion ( version ) ; } catch ( final IllegalArgumentException iae ) { return defaultValue ; } |
public class Quaternionf { /** * Apply a rotation to this quaternion that maps the given direction to the positive Z axis .
* Because there are multiple possibilities for such a rotation , this method will choose the one that ensures the given up direction to remain
* parallel to the plane spanned by the < code > u... | return lookAlong ( dir . x ( ) , dir . y ( ) , dir . z ( ) , up . x ( ) , up . y ( ) , up . z ( ) , this ) ; |
public class AbstractCircleController { private void stopDragging ( ) { } } | if ( dragging ) { dragging = false ; getContainer ( ) . remove ( circle ) ; getContainer ( ) . remove ( line ) ; } |
public class CommitsApi { /** * Get a specific commit identified by the commit hash or name of a branch or tag as an Optional instance
* < pre > < code > GitLab Endpoint : GET / projects / : id / repository / commits / : sha / refs < / code > < / pre >
* @ param projectIdOrPath the project in the form of an Integer... | return ( getCommitRefs ( projectIdOrPath , sha , RefType . ALL ) ) ; |
public class HadoopProxy { /** * Kill all Spawned Hadoop Jobs
* @ param jobProps job properties
* @ param logger logger handler */
public void killAllSpawnedHadoopJobs ( Props jobProps , final Logger logger ) { } } | if ( tokenFile == null ) { return ; // do null check for tokenFile
} final String logFilePath = jobProps . getString ( CommonJobProperties . JOB_LOG_FILE ) ; logger . info ( "Log file path is: " + logFilePath ) ; HadoopJobUtils . proxyUserKillAllSpawnedHadoopJobs ( logFilePath , jobProps , tokenFile , logger ) ; |
public class Utils { /** * Copy the given file .
* @ param filename the file to copy .
* @ param configuration the configuration . */
public static void performCopy ( String filename , SarlConfiguration configuration ) { } } | if ( filename . isEmpty ( ) ) { return ; } try { final DocFile fromfile = DocFile . createFileForInput ( configuration , filename ) ; final DocPath path = DocPath . create ( fromfile . getName ( ) ) ; final DocFile toFile = DocFile . createFileForOutput ( configuration , path ) ; if ( toFile . isSameFile ( fromfile ) )... |
public class UnrelatedCollectionContents { /** * implements the visitor to create and destroy the stack and member collections
* @ param classContext
* the context object for the currently parsed class */
@ Override public void visitClassContext ( final ClassContext classContext ) { } } | try { stack = new OpcodeStack ( ) ; memberCollections = new HashMap < > ( ) ; memberSourceLineAnnotations = new HashMap < > ( ) ; super . visitClassContext ( classContext ) ; } finally { stack = null ; memberCollections = null ; memberSourceLineAnnotations = null ; } |
public class BplusTree { /** * Find node that can hold the key
* @ param key
* @ return LeafNode < K , V > containing the key or null if not found */
private final LeafNode < K , V > findLeafNode ( final K key , final boolean tracePath ) { } } | Node < K , V > node = getNode ( rootIdx ) ; if ( tracePath ) { stackNodes . clear ( ) ; stackSlots . clear ( ) ; } while ( ! node . isLeaf ( ) ) { final InternalNode < K , V > nodeInternal = ( InternalNode < K , V > ) node ; int slot = node . findSlotByKey ( key ) ; slot = ( ( slot < 0 ) ? ( - slot ) - 1 : slot + 1 ) ;... |
public class AbstractEndpoint { /** * Loads a PropertyMap from the current security context that was previously stored
* there by one of the Notions that was executed before this relationship creation .
* @ param securityContext the security context
* @ param type the entity type
* @ param storageKey the key fo... | final Map < String , PropertyMap > notionPropertyMap = ( Map < String , PropertyMap > ) securityContext . getAttribute ( "notionProperties" ) ; if ( notionPropertyMap != null ) { final Set < PropertyKey > keySet = Services . getInstance ( ) . getConfigurationProvider ( ) . getPropertySet ( type , PropertyView . Public ... |
public class SpatialiteCommonMethods { /** * Check for compatibility issues with other databases .
* @ param sql the original sql .
* @ return the fixed sql . */
public static String checkCompatibilityIssues ( String sql ) { } } | sql = sql . replaceAll ( "LONG PRIMARY KEY AUTOINCREMENT" , "INTEGER PRIMARY KEY AUTOINCREMENT" ) ; sql = sql . replaceAll ( "AUTO_INCREMENT" , "AUTOINCREMENT" ) ; return sql ; |
public class ZooKeeperMasterModel { /** * rollingUpdateUndeploy is used to undeploy jobs during a rolling update . It enables the
* ' skipRedundantUndeploys ' flag , which enables the redundantDeployment ( ) check . */
private RollingUpdateOp rollingUpdateUndeploy ( final ZooKeeperClient client , final RollingUpdateO... | return rollingUpdateUndeploy ( client , opFactory , deploymentGroup , host , true ) ; |
public class AdminServlet { public void doGet ( HttpServletRequest request , HttpServletResponse response ) throws ServletException , IOException { } } | if ( request . getQueryString ( ) != null && request . getQueryString ( ) . length ( ) > 0 ) { String target = doAction ( request ) ; response . sendRedirect ( request . getContextPath ( ) + request . getServletPath ( ) + ( request . getPathInfo ( ) != null ? request . getPathInfo ( ) : "" ) + ( target != null ? ( "#" ... |
public class FilterCell { /** * Add a new succeeding cell to this cell , based on a new valid address value
* that
* can follow this cell ' s value , into the address tree . This is done
* by adding the new cell to the hashtable of next cells .
* @ param newValue
* a valid value , that can follow this cell ' ... | if ( newValue != - 1 ) { if ( nextCell == null ) { nextCell = new FastSynchHashTable ( ) ; } FilterCell newCell = new FilterCell ( ) ; nextCell . put ( newValue , newCell ) ; return newCell ; } if ( wildcardCell == null ) { wildcardCell = new FilterCell ( ) ; } return wildcardCell ; |
public class CmsWaitHandle { /** * Waits for a maximum of waitTime , but returns if another thread calls release ( ) . < p >
* @ param waitTime the maximum wait time */
public synchronized void enter ( long waitTime ) { } } | if ( m_singleUse && m_released ) { return ; } try { wait ( waitTime ) ; } catch ( InterruptedException e ) { // should never happen , but log it just in case . . .
LOG . error ( e . getLocalizedMessage ( ) , e ) ; } |
public class WampAnnotationMethodMessageHandler { /** * Configure the complete list of supported argument types effectively overriding the
* ones configured by default . This is an advanced option . For most use cases it
* should be sufficient to use { @ link # setCustomArgumentResolvers ( java . util . List ) } . ... | if ( argumentResolvers == null ) { this . argumentResolvers . clear ( ) ; return ; } this . argumentResolvers . addResolvers ( argumentResolvers ) ; |
public class ImageTexture { /** * Provide array of String results from inputOutput MFString field named url .
* @ array saved in valueDestination */
public String [ ] getUrl ( ) { } } | String [ ] valueDestination = new String [ url . size ( ) ] ; this . url . getValue ( valueDestination ) ; return valueDestination ; |
public class VanillaNetworkContext { /** * Close the connection atomically .
* @ return true if state changed to closed ; false if nothing changed . */
protected boolean closeAtomically ( ) { } } | if ( isClosed . compareAndSet ( false , true ) ) { Closeable . closeQuietly ( networkStatsListener ) ; return true ; } else { // was already closed .
return false ; } |
public class XsValueImpl { /** * utilities */
private static void checkType ( String typeName , QName type ) { } } | if ( ! typeName . equals ( type . getLocalPart ( ) ) ) { throw new IllegalArgumentException ( "requires " + typeName + " instead of " + type . getLocalPart ( ) ) ; } |
public class MediaTypes { /** * Contains any of these types ?
* @ param types Types
* @ return TRUE if any of these types are present inside this . list */
public boolean contains ( final MediaTypes types ) { } } | boolean contains = false ; for ( final MediaType type : types . list ) { if ( this . contains ( type ) ) { contains = true ; break ; } } return contains ; |
public class List { /** * setter for itemList - sets contains items of the level 1 . The items of the level 1 could contain further items of next level and so on in order to represent an iterative structure of list items .
* @ generated
* @ param v value to set into the feature */
public void setItemList ( FSArray ... | if ( List_Type . featOkTst && ( ( List_Type ) jcasType ) . casFeat_itemList == null ) jcasType . jcas . throwFeatMissing ( "itemList" , "de.julielab.jules.types.List" ) ; jcasType . ll_cas . ll_setRefValue ( addr , ( ( List_Type ) jcasType ) . casFeatCode_itemList , jcasType . ll_cas . ll_getFSRef ( v ) ) ; |
public class TemplateLocation { /** * Determine if this template location exists using the specified
* { @ link ResourcePatternResolver } .
* @ param resolver the resolver used to test if the location exists
* @ return { @ code true } if the location exists . */
public boolean exists ( ResourcePatternResolver res... | Assert . notNull ( resolver , "Resolver must not be null" ) ; if ( resolver . getResource ( this . path ) . exists ( ) ) { return true ; } try { return anyExists ( resolver ) ; } catch ( IOException ex ) { return false ; } |
public class TenantServiceClient { /** * Lists all tenants associated with the project .
* < p > Sample code :
* < pre > < code >
* try ( TenantServiceClient tenantServiceClient = TenantServiceClient . create ( ) ) {
* ProjectName parent = ProjectName . of ( " [ PROJECT ] " ) ;
* for ( Tenant element : tenant... | ListTenantsRequest request = ListTenantsRequest . newBuilder ( ) . setParent ( parent ) . build ( ) ; return listTenants ( request ) ; |
public class PersistenceUtil { /** * Will create a publisher that parallelizes each publisher returned from the < b > publisherFunction < / b > by executing
* them on the executor as needed .
* Note that returned publisher will be publishing entries from the invocation of the executor . Thus any subscription
* wi... | return org . infinispan . persistence . internal . PersistenceUtil . parallelizePublisher ( segments , Schedulers . from ( executor ) , publisherFunction ) ; |
public class AbstractProbeListener { /** * Build a stack trace string
* @ param failure The failure to get the exceptions and so on
* @ return The stack trace stringified */
protected String createAndlogStackTrace ( Failure failure ) { } } | StringBuilder sb = new StringBuilder ( ) ; if ( failure . getMessage ( ) != null && ! failure . getMessage ( ) . isEmpty ( ) ) { sb . append ( "Failure message: " ) . append ( failure . getMessage ( ) ) ; } if ( failure . getException ( ) != null ) { sb . append ( "\n\n" ) ; sb . append ( failure . getException ( ) . g... |
public class TokenSequencePreservingPartialParsingHelper { /** * Investigates the composite nodes containing the changed region and collects a list of nodes which could possibly
* replaced by a partial parse . Such a node has a parent that consumes all his current lookahead tokens and all of
* these tokens are loca... | List < ICompositeNode > result = new ArrayList < ICompositeNode > ( ) ; boolean mustSkipNext = false ; for ( int i = 0 ; i < nodesEnclosingRegion . size ( ) ; i ++ ) { ICompositeNode node = nodesEnclosingRegion . get ( i ) ; if ( node . getGrammarElement ( ) != null ) { if ( ! mustSkipNext ) { result . add ( node ) ; i... |
public class Queue { /** * / * ( non - Javadoc )
* @ see com . ibm . ws . sib . processor . runtime . SIMPQueueControllable # getRemoteQueuePointIterator ( ) */
public SIMPIterator getRemoteQueuePointIterator ( ) throws SIMPException { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getRemoteQueuePointIterator" ) ; assertMessageHandlerNotCorrupt ( ) ; Index index = baseDest . getRemoteQueuePoints ( ) ; SIMPIterator itr = index . iterator ( ) ; SIMPIterator returnItr = new BasicSIMPIterator ( itr ) ; if ... |
public class PermissionsImpl { /** * Gets the list of user emails that have permissions to access your application .
* @ param appId The application ID .
* @ param serviceCallback the async ServiceCallback to handle successful and failed responses .
* @ throws IllegalArgumentException thrown if parameters fail th... | return ServiceFuture . fromResponse ( listWithServiceResponseAsync ( appId ) , serviceCallback ) ; |
public class FileSnap { /** * deserialize the datatree from an inputarchive
* @ param dt the datatree to be serialized into
* @ param sessions the sessions to be filled up
* @ param ia the input archive to restore from
* @ throws IOException */
public void deserialize ( DataTree dt , Map < Long , Long > session... | FileHeader header = new FileHeader ( ) ; header . deserialize ( ia , "fileheader" ) ; if ( header . getMagic ( ) != SNAP_MAGIC ) { throw new IOException ( "mismatching magic headers " + header . getMagic ( ) + " != " + FileSnap . SNAP_MAGIC ) ; } SerializeUtils . deserializeSnapshot ( dt , ia , sessions ) ; |
public class CollectorRegistry { /** * Register a Collector .
* A collector can be registered to multiple CollectorRegistries . */
public void register ( Collector m ) { } } | List < String > names = collectorNames ( m ) ; synchronized ( collectorsToNames ) { for ( String name : names ) { if ( namesToCollectors . containsKey ( name ) ) { throw new IllegalArgumentException ( "Collector already registered that provides name: " + name ) ; } } for ( String name : names ) { namesToCollectors . pu... |
public class InApplicationMonitorJMXConnector { /** * / * operations that can be invoked via JMX */
private void addStatsdPlugin ( String host , Integer port , String appName , Double sampleRate ) { } } | StatsdPlugin statsdPlugin ; try { statsdPlugin = new StatsdPlugin ( host , port , appName , sampleRate ) ; InApplicationMonitor . getInstance ( ) . registerPlugin ( statsdPlugin ) ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; } |
public class WMenu { /** * Override handleRequest in order to perform processing specific to WMenu .
* @ param request the request being handled . */
@ Override public void handleRequest ( final Request request ) { } } | if ( isDisabled ( ) ) { // Protect against client - side tampering of disabled / read - only fields .
return ; } if ( isPresent ( request ) ) { List < MenuItemSelectable > selectedItems = new ArrayList < > ( ) ; // Unfortunately , we need to recurse through all the menu / sub - menus
findSelections ( request , this , s... |
public class ListAssignmentsForHITRequest { /** * The status of the assignments to return : Submitted | Approved | Rejected
* @ param assignmentStatuses
* The status of the assignments to return : Submitted | Approved | Rejected
* @ return Returns a reference to this object so that method calls can be chained tog... | java . util . ArrayList < String > assignmentStatusesCopy = new java . util . ArrayList < String > ( assignmentStatuses . length ) ; for ( AssignmentStatus value : assignmentStatuses ) { assignmentStatusesCopy . add ( value . toString ( ) ) ; } if ( getAssignmentStatuses ( ) == null ) { setAssignmentStatuses ( assignme... |
public class MerkleTreeUtil { /** * Returns the breadth - first order of the rightmost leaf in the
* subtree selected by { @ code nodeOrder } as the root of the subtree
* @ param nodeOrder The order of the node as the root of the subtree
* @ param depth The depth of the tree
* @ return the breadth - first order... | if ( isLeaf ( nodeOrder , depth ) ) { return nodeOrder ; } int levelOfNode = getLevelOfNode ( nodeOrder ) ; int distanceFromLeafLevel = depth - levelOfNode - 1 ; int leftMostLeafUnderNode = getLeftMostLeafUnderNode ( nodeOrder , depth ) ; int leavesOfSubtreeUnderNode = getNodesOnLevel ( distanceFromLeafLevel ) ; return... |
public class ThrottlingException { /** * The payload associated with the exception .
* { @ code ByteBuffer } s are stateful . Calling their { @ code get } methods changes their { @ code position } . We recommend
* using { @ link java . nio . ByteBuffer # asReadOnlyBuffer ( ) } to create a read - only view of the bu... | return this . payload ; |
public class BasicChecker { /** * Internal method to check that cert has a valid DN to be next in a chain */
private void verifyNameChaining ( X509Certificate cert ) throws CertPathValidatorException { } } | if ( prevSubject != null ) { String msg = "subject/issuer name chaining" ; if ( debug != null ) debug . println ( "---checking " + msg + "..." ) ; X500Principal currIssuer = cert . getIssuerX500Principal ( ) ; // reject null or empty issuer DNs
if ( X500Name . asX500Name ( currIssuer ) . isEmpty ( ) ) { throw new CertP... |
public class ConnectionsInner { /** * Update a connection .
* @ param resourceGroupName Name of an Azure Resource group .
* @ param automationAccountName The name of the automation account .
* @ param connectionName The parameters supplied to the update a connection operation .
* @ param parameters The paramete... | return updateWithServiceResponseAsync ( resourceGroupName , automationAccountName , connectionName , parameters ) . map ( new Func1 < ServiceResponse < ConnectionInner > , ConnectionInner > ( ) { @ Override public ConnectionInner call ( ServiceResponse < ConnectionInner > response ) { return response . body ( ) ; } } )... |
public class CliClassContainer { /** * This method adds the given { @ link CliMode } .
* @ param mode is the { @ link CliMode } to add . */
protected void addMode ( CliModeContainer mode ) { } } | CliModeObject old = this . id2ModeMap . put ( mode . getId ( ) , mode ) ; if ( old != null ) { CliStyleHandling handling = this . cliStyle . modeDuplicated ( ) ; DuplicateObjectException exception = new DuplicateObjectException ( mode , mode . getMode ( ) . id ( ) ) ; if ( handling != CliStyleHandling . OK ) { handling... |
public class PDClient { /** * The main execution routine . Overwrite this method to add additional
* properties to the call .
* @ param aRequest
* The request to be executed . Never < code > null < / code > .
* @ param aHandler
* The response handler to be used . May not be < code > null < / code > .
* @ re... | // Contextual attributes set the local context level will take
// precedence over those set at the client level .
final HttpContext aContext = HttpClientHelper . createHttpContext ( m_aProxy , m_aProxyCredentials ) ; return m_aHttpClientMgr . execute ( aRequest , aContext , aHandler ) ; |
public class PartitionBalance { /** * Go through all node IDs and determine which node
* @ param cluster
* @ param storeRoutingPlan
* @ return */
private Map < Integer , Integer > getNodeIdToNaryCount ( Cluster cluster , StoreRoutingPlan storeRoutingPlan ) { } } | Map < Integer , Integer > nodeIdToNaryCount = Maps . newHashMap ( ) ; for ( int nodeId : cluster . getNodeIds ( ) ) { nodeIdToNaryCount . put ( nodeId , storeRoutingPlan . getZoneNAryPartitionIds ( nodeId ) . size ( ) ) ; } return nodeIdToNaryCount ; |
public class BaasUser { /** * Asynchronously requests to follow the user .
* @ param flags { @ link RequestOptions }
* @ param handler an handler to be invoked when the request completes
* @ return a { @ link com . baasbox . android . RequestToken } to manage the request */
public RequestToken follow ( int flags ... | BaasBox box = BaasBox . getDefaultChecked ( ) ; Follow follow = new Follow ( box , true , this , RequestOptions . DEFAULT , handler ) ; return box . submitAsync ( follow ) ; |
public class Unpickler { /** * Process a single pickle stream opcode . */
protected Object dispatch ( short key ) throws PickleException , IOException { } } | switch ( key ) { case Opcodes . MARK : load_mark ( ) ; break ; case Opcodes . STOP : Object value = stack . pop ( ) ; stack . clear ( ) ; return value ; // final result value
case Opcodes . POP : load_pop ( ) ; break ; case Opcodes . POP_MARK : load_pop_mark ( ) ; break ; case Opcodes . DUP : load_dup ( ) ; break ; cas... |
public class AgentServlet { /** * OPTION requests are treated as CORS preflight requests
* @ param req the original request
* @ param resp the response the answer are written to */
@ Override protected void doOptions ( HttpServletRequest req , HttpServletResponse resp ) throws ServletException , IOException { } } | Map < String , String > responseHeaders = requestHandler . handleCorsPreflightRequest ( getOriginOrReferer ( req ) , req . getHeader ( "Access-Control-Request-Headers" ) ) ; for ( Map . Entry < String , String > entry : responseHeaders . entrySet ( ) ) { resp . setHeader ( entry . getKey ( ) , entry . getValue ( ) ) ; ... |
public class FormPrintServiceImpl { /** * This method is used to generate byte stream of forms
* @ param pdDoc
* ProposalDevelopmentDocumentContract
* @ return ByteArrayOutputStream [ ] PDF byte Array */
protected PrintableResult getPDFStream ( ProposalDevelopmentDocumentContract pdDoc ) throws S2SException { } } | List < AuditError > errors = new ArrayList < > ( ) ; DevelopmentProposalContract developmentProposal = pdDoc . getDevelopmentProposal ( ) ; String proposalNumber = developmentProposal . getProposalNumber ( ) ; List < String > sortedNameSpaces = getSortedNameSpaces ( proposalNumber , developmentProposal . getS2sOppForms... |
public class GenomicsUtils { /** * Gets CallSets for a given variantSetId using the Genomics API .
* @ param variantSetId The id of the variantSet to query .
* @ param auth The OfflineAuth for the API request .
* @ return The list of callSet names in the variantSet .
* @ throws IOException If variantSet does no... | Genomics genomics = GenomicsFactory . builder ( ) . build ( ) . fromOfflineAuth ( auth ) ; return Paginator . Callsets . create ( genomics ) . search ( new SearchCallSetsRequest ( ) . setVariantSetIds ( Lists . newArrayList ( variantSetId ) ) , "callSets,nextPageToken" ) ; |
public class FixedJitterBuffer { /** * Resets buffer . */
public void reset ( ) { } } | boolean locked = false ; try { locked = lock . tryLock ( ) || lock . tryLock ( 5 , TimeUnit . MILLISECONDS ) ; if ( locked ) { while ( queue . size ( ) > 0 ) { queue . remove ( 0 ) . recycle ( ) ; } } } catch ( InterruptedException e ) { if ( logger . isTraceEnabled ( ) ) { logger . trace ( "Could not acquire lock to r... |
public class SingleLockedMessageEnumerationImpl { /** * Peek at the next message on the enumeration .
* In the SingleLockedMessageEnumeration there is only one message .
* If the nextLocked hasn ' t been called then the message will be returned ,
* otherwise a null will be returned . */
public SIBusMessage peek (... | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "peek" ) ; checkValidState ( "peek" ) ; _localConsumerPoint . checkNotClosed ( ) ; SIBusMessage nextMessage = null ; if ( ! _seenSingleMessage ) { // Because this message is not in the message store there is no need to copy ... |
public class BlockDataHandler { /** * Creates the { @ link ChunkData } for specified identifier for the { @ link Chunk } at the { @ link BlockPos } .
* @ param < T > the generic type
* @ param identifier the identifier
* @ param world the world
* @ param pos the pos
* @ return the chunk data */
@ SuppressWarn... | Chunk chunk = world . getChunkFromBlockCoords ( pos ) ; // System . out . println ( " createChunkData ( " + chunk . xPosition + " / " + chunk . zPosition + " ) for " + identifier ) ;
ChunkData < T > chunkData = new ChunkData < > ( ( HandlerInfo < T > ) handlerInfos . get ( identifier ) ) ; datas . get ( ) . put ( ident... |
public class MixedRealityClientImpl { /** * Check Name Availability for global uniqueness .
* @ param location The location in which uniqueness will be verified .
* @ param checkNameAvailability Check Name Availability Request .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ th... | return checkNameAvailabilityLocalWithServiceResponseAsync ( location , checkNameAvailability ) . toBlocking ( ) . single ( ) . body ( ) ; |
public class XmlUtil { /** * Write a pretty version of the Element to the OutputStream .
* @ param element the Element to serialize
* @ param os the OutputStream to write to */
public static void serialize ( Element element , OutputStream os ) { } } | Source source = new DOMSource ( element ) ; serialize ( source , os ) ; |
public class ArrayUtil { /** * Un - flatten a one - dimensional array into an multi - dimensional array based on the provided dimensions .
* @ param array the 1 - dimensional array to un - flatten .
* @ param dimensions the dimensions to un - flatten to .
* @ return a multi - dimensional array of the provided dim... | Class < ? > type = getType ( array ) ; return unflatten ( type , array , dimensions , 0 ) ; |
public class JVnSenSegmenter { /** * main method of JVnSenSegmenter
* to use this tool from command line .
* @ param args the arguments */
public static void main ( String args [ ] ) { } } | if ( args . length != 4 ) { displayHelp ( ) ; System . exit ( 1 ) ; } try { JVnSenSegmenter senSegmenter = new JVnSenSegmenter ( ) ; senSegmenter . init ( args [ 1 ] ) ; String option = args [ 2 ] ; if ( option . equalsIgnoreCase ( "-inputfile" ) ) { senSegmentFile ( args [ 3 ] , args [ 3 ] + ".sent" , senSegmenter ) ;... |
public class PostProcessorCssImageUrlRewriter { /** * ( non - Javadoc )
* @ see net . jawr . web . resource . bundle . css . CssImageUrlRewriter #
* getRewrittenImagePath ( java . lang . String , java . lang . String ,
* java . lang . String ) */
@ Override protected String getRewrittenImagePath ( String original... | String imgUrl = null ; // Retrieve the current CSS file from which the CSS image is referenced
String currentCss = originalCssPath ; boolean generatedImg = false ; if ( binaryRsHandler != null ) { GeneratorRegistry imgRsGeneratorRegistry = binaryRsHandler . getConfig ( ) . getGeneratorRegistry ( ) ; generatedImg = imgR... |
public class AAFConDME2 { /** * / * ( non - Javadoc )
* @ see com . att . cadi . aaf . v2_0 . AAFCon # rclient ( java . net . URI , com . att . cadi . SecuritySetter ) */
@ Override protected Rcli < DME2Client > rclient ( URI uri , SecuritySetter < DME2Client > ss ) { } } | DRcli dc = new DRcli ( uri , ss ) ; dc . setProxy ( isProxy ) ; dc . setManager ( manager ) ; return dc ; |
public class PackageUseWriter { /** * Generate the package use list .
* @ throws DocFileIOException if there is a problem generating the package use page */
protected void generatePackageUseFile ( ) throws DocFileIOException { } } | HtmlTree body = getPackageUseHeader ( ) ; HtmlTree div = new HtmlTree ( HtmlTag . DIV ) ; div . addStyle ( HtmlStyle . contentContainer ) ; if ( usingPackageToUsedClasses . isEmpty ( ) ) { div . addContent ( contents . getContent ( "doclet.ClassUse_No.usage.of.0" , utils . getPackageName ( packageElement ) ) ) ; } else... |
public class TableColumn { /** * Set the width of the column form an attribute or CSS
* @ param width the new width */
public void setSpecifiedWidth ( String width ) { } } | colwidth = width ; try { content = new Dimension ( 0 , 0 ) ; content . width = Integer . parseInt ( width ) ; bounds . width = content . width ; abswidth = content . width ; wset = true ; } catch ( NumberFormatException e ) { if ( ! width . equals ( "" ) ) log . warn ( "Invalid width value: " + width ) ; } |
public class CloudTrailEventData { /** * Get the resources used in the operation .
* @ return A list of resources used in this operation . */
@ SuppressWarnings ( "unchecked" ) public List < Resource > getResources ( ) { } } | return ( List < Resource > ) get ( CloudTrailEventField . resources . name ( ) ) ; |
public class GitChangelogApi { /** * Get the changelog . */
public String render ( ) throws GitChangelogRepositoryException { } } | final Writer writer = new StringWriter ( ) ; render ( writer ) ; return writer . toString ( ) ; |
public class HttpResponse { /** * Reset the response .
* Clears any data that exists in the buffer as well as the status
* code . If the response has been committed , this method throws an
* < code > IllegalStateException < / code > .
* @ exception IllegalStateException if the response has already been
* comm... | if ( isCommitted ( ) ) throw new IllegalStateException ( "Already committed" ) ; try { ( ( HttpOutputStream ) getOutputStream ( ) ) . resetBuffer ( ) ; _status = __200_OK ; _reason = null ; super . reset ( ) ; setField ( HttpFields . __Date , getRequest ( ) . getTimeStampStr ( ) ) ; if ( ! Version . isParanoid ( ) ) se... |
public class BearerTokenExtractor { /** * Extract the OAuth bearer token from a header .
* @ param request The request .
* @ return The token , or null if no OAuth authorization header was supplied . */
protected String extractHeaderToken ( HttpServletRequest request ) { } } | Enumeration < String > headers = request . getHeaders ( "Authorization" ) ; while ( headers . hasMoreElements ( ) ) { // typically there is only one ( most servers enforce that )
String value = headers . nextElement ( ) ; if ( ( value . toLowerCase ( ) . startsWith ( OAuth2AccessToken . BEARER_TYPE . toLowerCase ( ) ) ... |
public class OverviewPlot { /** * When a subplot was selected , forward the event to listeners .
* @ param it PlotItem selected */
protected void triggerSubplotSelectEvent ( PlotItem it ) { } } | // forward event to all listeners .
for ( ActionListener actionListener : actionListeners ) { actionListener . actionPerformed ( new DetailViewSelectedEvent ( this , ActionEvent . ACTION_PERFORMED , null , 0 , it ) ) ; } |
public class CmsHtmlExtractor { /** * Extract the text from a HTML page . < p >
* @ param content the html content
* @ param encoding the encoding of the content
* @ return the extracted text from the page
* @ throws ParserException if the parsing of the HTML failed
* @ throws UnsupportedEncodingException if ... | if ( CmsStringUtil . isEmpty ( content ) ) { // if there is no HTML , then we don ' t need to extract anything
return content ; } // we must make sure that the content passed to the parser always is
// a " valid " HTML page , i . e . is surrounded by < html > < body > . . . < / body > < / html >
// otherwise you will g... |
public class NetworkService { /** * { @ inheritDoc } */
@ Override public boolean isDisconnecting ( ) { } } | NetworkInfo networkInfo = isAvailable ( ) ; return ( networkInfo == null ) ? false : ( networkInfo . getState ( ) . equals ( State . DISCONNECTING ) ) ? true : false ; |
public class CmsContainerElementBean { /** * Sets the settings map . < p >
* @ param settings the settings */
private void setSettings ( Map < String , String > settings ) { } } | if ( settings == null ) { m_settings = null ; } else { m_settings = new CmsNullIgnoringConcurrentMap < String , String > ( settings ) ; } |
public class MACAddressSection { /** * Replaces segments starting from startIndex and ending before endIndex with the segments starting at replacementStartIndex and
* ending before replacementEndIndex from the replacement section
* @ param startIndex
* @ param endIndex
* @ param replacement
* @ param replacem... | return replace ( startIndex , endIndex , replacement , replacementStartIndex , replacementEndIndex , false ) ; |
public class FirewallRulesInner { /** * Gets the specified Data Lake Store firewall rule .
* @ param resourceGroupName The name of the Azure resource group .
* @ param accountName The name of the Data Lake Store account .
* @ param firewallRuleName The name of the firewall rule to retrieve .
* @ param serviceCa... | return ServiceFuture . fromResponse ( getWithServiceResponseAsync ( resourceGroupName , accountName , firewallRuleName ) , serviceCallback ) ; |
public class CRFClassifier { /** * Convert an ObjectBank to corresponding collection of data features and
* labels .
* @ return A List of pairs , one for each document , where the first element is
* an int [ ] [ ] [ ] representing the data and the second element is an
* int [ ] representing the labels . */
publ... | int numDatums = 0 ; List < Pair < int [ ] [ ] [ ] , int [ ] > > docList = new ArrayList < Pair < int [ ] [ ] [ ] , int [ ] > > ( ) ; for ( List < IN > doc : documents ) { Pair < int [ ] [ ] [ ] , int [ ] > docPair = documentToDataAndLabels ( doc ) ; docList . add ( docPair ) ; numDatums += doc . size ( ) ; } System . e... |
public class CoinbaseAccountServiceRaw { /** * Authenticated resource which returns an order for a new button .
* @ param button A { @ code CoinbaseButton } containing information to create a one time order .
* @ return The newly created { @ code CoinbaseOrder } .
* @ throws IOException
* @ see < a
* href = "... | final CoinbaseOrder createdOrder = coinbase . createOrder ( button , exchange . getExchangeSpecification ( ) . getApiKey ( ) , signatureCreator , exchange . getNonceFactory ( ) ) ; return handleResponse ( createdOrder ) ; |
public class VolumesFrom { /** * Parses a volume from specification to a { @ link VolumesFrom } .
* @ param serialized
* the specification , e . g . < code > container : ro < / code >
* @ return a { @ link VolumesFrom } matching the specification
* @ throws IllegalArgumentException
* if the specification cann... | try { String [ ] parts = serialized . split ( ":" ) ; switch ( parts . length ) { case 1 : { return new VolumesFrom ( parts [ 0 ] ) ; } case 2 : { return new VolumesFrom ( parts [ 0 ] , AccessMode . valueOf ( parts [ 1 ] ) ) ; } default : { throw new IllegalArgumentException ( ) ; } } } catch ( Exception e ) { throw ne... |
public class FessMailDeliveryDepartmentCreator { protected String resolveLabelIfNeeds ( final MessageManager messageManager , final Locale locale , final String label ) { } } | return label . startsWith ( "labels." ) ? messageManager . getMessage ( locale , label ) : label ; |
public class Utils { /** * Convert the given JSON string into an object using
* < a href = " https : / / github . com / google / gson " > Gson < / a > .
* @ param json
* The input JSON .
* @ param klass
* The class of the resultant object .
* @ return
* A new object generated based on the input JSON .
*... | return GSON . fromJson ( json , klass ) ; |
public class URLStreamHandlerAdapter { /** * OSGi Core 4.3 , section 52.3.5 */
@ SuppressWarnings ( "unused" ) public URLConnection openConnection ( URL url , Proxy proxy ) throws IOException { } } | try { return ( URLConnection ) _openConnectionProxy . invoke ( getInstance ( ) , new Object [ ] { url , proxy } ) ; } catch ( Exception e ) { FFDCFilter . processException ( e , getClass ( ) . getName ( ) , "openConnection" , new Object [ ] { url , proxy } ) ; return null ; } |
public class SchemaTypeAdapter { /** * Constructs { @ link Schema . Type # RECORD RECORD } type schema from the json input .
* @ param reader The { @ link JsonReader } for streaming json input tokens .
* @ param knownRecords Set of record name already encountered during the reading .
* @ return A { @ link Schema ... | if ( ! "name" . equals ( reader . nextName ( ) ) ) { throw new IOException ( "Property \"name\" missing for record." ) ; } String recordName = reader . nextString ( ) ; // Read in fields schemas
if ( ! "fields" . equals ( reader . nextName ( ) ) ) { throw new IOException ( "Property \"fields\" missing for record." ) ; ... |
public class AWSAmplifyClient { /** * Create a new DomainAssociation on an App
* @ param updateDomainAssociationRequest
* Request structure for update Domain Association request .
* @ return Result of the UpdateDomainAssociation operation returned by the service .
* @ throws BadRequestException
* Exception th... | request = beforeClientExecution ( request ) ; return executeUpdateDomainAssociation ( request ) ; |
public class GetThreatIntelSetRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( GetThreatIntelSetRequest getThreatIntelSetRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( getThreatIntelSetRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getThreatIntelSetRequest . getDetectorId ( ) , DETECTORID_BINDING ) ; protocolMarshaller . marshall ( getThreatIntelSetRequest . getThreatIntelSetId ( ) , THREA... |
public class Throwables { /** * Constructs the error item message from the log message and the throwable ' s message
* @ param logMessage The log message ( can be null )
* @ param throwableMessage The throwable ' s message ( can be null )
* @ return The error item message */
private static String toErrorItemMessa... | StringBuilder sb = new StringBuilder ( ) ; if ( ( throwableMessage != null ) && ( ! throwableMessage . isEmpty ( ) ) ) { sb . append ( throwableMessage ) ; if ( ( logMessage != null ) && ( ! logMessage . isEmpty ( ) ) ) { sb . append ( " (" ) ; sb . append ( logMessage ) ; sb . append ( ")" ) ; } } else { sb . append (... |
public class ServiceCapabilitiesReportGenerator { /** * Generate a report for the specified service . The report contains the available
* capabilities as advertised by the root endpoint .
* @ param url the url of the service
* @ return the report that describes the service
* @ throws IOException if the report c... | Object content = this . initializrService . loadServiceCapabilities ( url ) ; if ( content instanceof InitializrServiceMetadata ) { return generateHelp ( url , ( InitializrServiceMetadata ) content ) ; } return content . toString ( ) ; |
public class ContextRepresenters { /** * Fetch the context with the given ID .
* @ param contextId
* @ return */
public synchronized EvaluatorContext getContext ( final String contextId ) { } } | for ( final EvaluatorContext context : this . contextStack ) { if ( context . getId ( ) . equals ( contextId ) ) { return context ; } } throw new RuntimeException ( "Unknown evaluator context " + contextId ) ; |
public class ArmeriaMessageDeframer { /** * Processes the gRPC compression header which is composed of the compression flag and the outer
* frame length . */
private void readHeader ( ) { } } | final int type = readUnsignedByte ( ) ; if ( ( type & RESERVED_MASK ) != 0 ) { throw new ArmeriaStatusException ( StatusCodes . INTERNAL , DEBUG_STRING + ": Frame header malformed: reserved bits not zero" ) ; } compressedFlag = ( type & COMPRESSED_FLAG_MASK ) != 0 ; // Update the required length to include the length o... |
public class MoneyUtils { /** * Subtracts the second { @ code BigMoney } from the first , handling null .
* This returns { @ code money1 - money2 } where null is ignored .
* If both input values are null , then null is returned .
* @ param money1 the first money instance , null treated as zero
* @ param money2 ... | if ( money2 == null ) { return money1 ; } if ( money1 == null ) { return money2 . negated ( ) ; } return money1 . minus ( money2 ) ; |
public class StAXDecoder { /** * Returns a QName for the current START _ ELEMENT or END _ ELEMENT event
* ( non - Javadoc )
* @ see javax . xml . stream . XMLStreamReader # getName ( ) */
public QName getName ( ) { } } | // Returns a QName for the current START _ ELEMENT or END _ ELEMENT event
QName qn = new QName ( element . getNamespaceUri ( ) , element . getLocalName ( ) , this . getPrefix ( ) ) ; return qn ; |
public class RESTClient { /** * Send a REST command with the given method , URI , headers , and body to the
* server and return the response in a { @ link RESTResponse } object .
* @ param method HTTP method such as " GET " or " POST " .
* @ param uri URI such as " / foo / bar ? baz "
* @ param headers Headers ... | // Compress body using GZIP and add a content - encoding header if compression is requested .
byte [ ] entity = body ; if ( m_bCompress && body != null && body . length > 0 ) { entity = Utils . compressGZIP ( body ) ; headers . put ( HttpDefs . CONTENT_ENCODING , "gzip" ) ; } return sendAndReceive ( method , uri , head... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.