idx int64 0 41.2k | question stringlengths 74 4.21k | target stringlengths 5 888 |
|---|---|---|
28,200 | private String getElementURI ( ) { String uri = null ; String prefix = getPrefixPart ( m_elemContext . m_elementName ) ; if ( prefix == null ) { uri = m_prefixMap . lookupNamespace ( "" ) ; } else { uri = m_prefixMap . lookupNamespace ( prefix ) ; } if ( uri == null ) { uri = EMPTYSTRING ; } return uri ; } | Before this call m_elementContext . m_elementURI is null which means it is not yet known . After this call it is non - null but possibly meaning that it is in the default namespace . |
28,201 | public String getOutputProperty ( String name ) { String val = getOutputPropertyNonDefault ( name ) ; if ( val == null ) val = getOutputPropertyDefault ( name ) ; return val ; } | Get the value of an output property the explicit value if any otherwise the default value if any otherwise null . |
28,202 | static char getFirstCharLocName ( String name ) { final char first ; int i = name . indexOf ( '}' ) ; if ( i < 0 ) first = name . charAt ( 0 ) ; else first = name . charAt ( i + 1 ) ; return first ; } | Get the first char of the local name |
28,203 | private FunctionDeclaration makeFunction ( MethodDeclaration method ) { ExecutableElement elem = method . getExecutableElement ( ) ; TypeElement declaringClass = ElementUtil . getDeclaringClass ( elem ) ; boolean isInstanceMethod = ! ElementUtil . isStatic ( elem ) && ! ElementUtil . isConstructor ( elem ) ; FunctionDeclaration function = new FunctionDeclaration ( nameTable . getFullFunctionName ( elem ) , elem . getReturnType ( ) ) ; function . setJniSignature ( signatureGenerator . createJniFunctionSignature ( elem ) ) ; function . setLineNumber ( method . getLineNumber ( ) ) ; if ( ! ElementUtil . isStatic ( elem ) ) { VariableElement var = GeneratedVariableElement . newParameter ( NameTable . SELF_NAME , declaringClass . asType ( ) , null ) ; function . addParameter ( new SingleVariableDeclaration ( var ) ) ; } TreeUtil . copyList ( method . getParameters ( ) , function . getParameters ( ) ) ; function . setModifiers ( method . getModifiers ( ) & Modifier . STATIC ) ; if ( ElementUtil . isPrivate ( elem ) || ( isInstanceMethod && ! ElementUtil . isDefault ( elem ) ) ) { function . addModifiers ( Modifier . PRIVATE ) ; } else { function . addModifiers ( Modifier . PUBLIC ) ; } if ( Modifier . isNative ( method . getModifiers ( ) ) ) { function . addModifiers ( Modifier . NATIVE ) ; return function ; } function . setBody ( TreeUtil . remove ( method . getBody ( ) ) ) ; if ( ElementUtil . isStatic ( elem ) || ElementUtil . isDefault ( elem ) ) { String initName = UnicodeUtils . format ( "%s_initialize" , nameTable . getFullName ( declaringClass ) ) ; TypeMirror voidType = typeUtil . getVoid ( ) ; FunctionElement initElement = new FunctionElement ( initName , voidType , declaringClass ) ; FunctionInvocation initCall = new FunctionInvocation ( initElement , voidType ) ; function . getBody ( ) . addStatement ( 0 , new ExpressionStatement ( initCall ) ) ; } else { FunctionConverter . convert ( function ) ; } return function ; } | Create an equivalent function declaration for a given method . |
28,204 | private FunctionDeclaration makeAllocatingConstructor ( MethodDeclaration method , boolean releasing ) { assert method . isConstructor ( ) ; ExecutableElement element = method . getExecutableElement ( ) ; TypeElement declaringClass = ElementUtil . getDeclaringClass ( element ) ; String name = releasing ? nameTable . getReleasingConstructorName ( element ) : nameTable . getAllocatingConstructorName ( element ) ; FunctionDeclaration function = new FunctionDeclaration ( name , declaringClass . asType ( ) ) ; function . setLineNumber ( method . getLineNumber ( ) ) ; function . setModifiers ( ElementUtil . isPrivate ( element ) ? Modifier . PRIVATE : Modifier . PUBLIC ) ; function . setReturnsRetained ( ! releasing ) ; TreeUtil . copyList ( method . getParameters ( ) , function . getParameters ( ) ) ; Block body = new Block ( ) ; function . setBody ( body ) ; StringBuilder sb = new StringBuilder ( releasing ? "J2OBJC_CREATE_IMPL(" : "J2OBJC_NEW_IMPL(" ) ; sb . append ( nameTable . getFullName ( declaringClass ) ) ; sb . append ( ", " ) . append ( nameTable . getFunctionName ( element ) ) ; for ( SingleVariableDeclaration param : function . getParameters ( ) ) { sb . append ( ", " ) . append ( nameTable . getVariableQualifiedName ( param . getVariableElement ( ) ) ) ; } sb . append ( ")" ) ; body . addStatement ( new NativeStatement ( sb . toString ( ) ) ) ; return function ; } | Create a wrapper for a constructor that does the object allocation . |
28,205 | private void setFunctionCaller ( MethodDeclaration method , ExecutableElement methodElement ) { TypeMirror returnType = methodElement . getReturnType ( ) ; TypeElement declaringClass = ElementUtil . getDeclaringClass ( methodElement ) ; Block body = new Block ( ) ; method . setBody ( body ) ; method . removeModifiers ( Modifier . NATIVE ) ; List < Statement > stmts = body . getStatements ( ) ; FunctionInvocation invocation = new FunctionInvocation ( newFunctionElement ( methodElement ) , returnType ) ; List < Expression > args = invocation . getArguments ( ) ; if ( ! ElementUtil . isStatic ( methodElement ) ) { args . add ( new ThisExpression ( declaringClass . asType ( ) ) ) ; } for ( SingleVariableDeclaration param : method . getParameters ( ) ) { args . add ( new SimpleName ( param . getVariableElement ( ) ) ) ; } if ( TypeUtil . isVoid ( returnType ) ) { stmts . add ( new ExpressionStatement ( invocation ) ) ; if ( ElementUtil . isConstructor ( methodElement ) ) { stmts . add ( new ReturnStatement ( new ThisExpression ( declaringClass . asType ( ) ) ) ) ; } } else { stmts . add ( new ReturnStatement ( invocation ) ) ; } } | Replace method block statements with single statement that invokes function . |
28,206 | private void addDisallowedConstructors ( TypeDeclaration node ) { TypeElement typeElement = node . getTypeElement ( ) ; TypeElement superClass = ElementUtil . getSuperclass ( typeElement ) ; if ( ElementUtil . isPrivateInnerType ( typeElement ) || ElementUtil . isAbstract ( typeElement ) || superClass == null || ( ! options . emitWrapperMethods ( ) && typeUtil . getObjcClass ( superClass ) != TypeUtil . NS_OBJECT ) ) { return ; } Map < String , ExecutableElement > inheritedConstructors = new HashMap < > ( ) ; for ( ExecutableElement superC : ElementUtil . getConstructors ( superClass ) ) { if ( ElementUtil . isPrivate ( superC ) ) { continue ; } String selector = nameTable . getMethodSelector ( superC ) ; inheritedConstructors . put ( selector , superC ) ; } if ( options . emitWrapperMethods ( ) ) { for ( ExecutableElement constructor : ElementUtil . getConstructors ( typeElement ) ) { inheritedConstructors . remove ( nameTable . getMethodSelector ( constructor ) ) ; } } for ( Map . Entry < String , ExecutableElement > entry : inheritedConstructors . entrySet ( ) ) { ExecutableElement oldConstructor = entry . getValue ( ) ; GeneratedExecutableElement newConstructor = GeneratedExecutableElement . newConstructorWithSelector ( entry . getKey ( ) , typeElement , typeUtil ) ; MethodDeclaration decl = new MethodDeclaration ( newConstructor ) . setUnavailable ( true ) ; decl . addModifiers ( Modifier . ABSTRACT ) ; int count = 0 ; for ( VariableElement param : oldConstructor . getParameters ( ) ) { VariableElement newParam = GeneratedVariableElement . newParameter ( "arg" + count ++ , param . asType ( ) , newConstructor ) ; newConstructor . addParameter ( newParam ) ; decl . addParameter ( new SingleVariableDeclaration ( newParam ) ) ; } addImplicitParameters ( decl , ElementUtil . getDeclaringClass ( oldConstructor ) ) ; node . addBodyDeclaration ( decl ) ; } } | Declare any inherited constructors that aren t allowed to be accessed in Java with a NS_UNAVAILABLE macro so that clang will flag such access from native code as an error . |
28,207 | private Scope findScopeForType ( TypeElement type ) { Scope scope = peekScope ( ) ; while ( scope != null ) { if ( scope . kind != ScopeKind . METHOD && type . equals ( scope . type ) ) { return scope ; } scope = scope . outer ; } return null ; } | Finds the non - method scope for the given type . |
28,208 | private void whenNeedsOuterParam ( TypeElement type , Runnable runnable ) { if ( captureInfo . needsOuterParam ( type ) ) { runnable . run ( ) ; } else if ( ElementUtil . isLocal ( type ) ) { Scope scope = findScopeForType ( type ) ; if ( scope != null ) { scope . onOuterParam . add ( captureCurrentScope ( runnable ) ) ; } } } | Executes the runnable if or when the given type needs an outer param . |
28,209 | private void addSuperOuterPath ( TypeDeclaration node ) { TypeElement superclass = ElementUtil . getSuperclass ( node . getTypeElement ( ) ) ; if ( superclass != null && captureInfo . needsOuterParam ( superclass ) ) { node . setSuperOuter ( getOuterPathInherited ( ElementUtil . getDeclaringClass ( superclass ) ) ) ; } } | type node because there may be implicit super invocations . |
28,210 | public final CharsetEncoder replaceWith ( byte [ ] newReplacement ) { if ( newReplacement == null ) throw new IllegalArgumentException ( "Null replacement" ) ; int len = newReplacement . length ; if ( len == 0 ) throw new IllegalArgumentException ( "Empty replacement" ) ; if ( len > maxBytesPerChar ) throw new IllegalArgumentException ( "Replacement too long" ) ; if ( ! isLegalReplacement ( newReplacement ) ) throw new IllegalArgumentException ( "Illegal replacement" ) ; this . replacement = newReplacement ; implReplaceWith ( newReplacement ) ; return this ; } | Changes this encoder s replacement value . |
28,211 | public boolean isLegalReplacement ( byte [ ] repl ) { CharsetDecoder dec = cachedDecoder ; if ( dec == null ) { dec = charset ( ) . newDecoder ( ) ; dec . onMalformedInput ( CodingErrorAction . REPORT ) ; dec . onUnmappableCharacter ( CodingErrorAction . REPORT ) ; cachedDecoder = dec ; } else { dec . reset ( ) ; } ByteBuffer bb = ByteBuffer . wrap ( repl ) ; CharBuffer cb = CharBuffer . allocate ( ( int ) ( bb . remaining ( ) * dec . maxCharsPerByte ( ) ) ) ; CoderResult cr = dec . decode ( bb , cb , true ) ; return ! cr . isError ( ) ; } | Tells whether or not the given byte array is a legal replacement value for this encoder . |
28,212 | public final CharsetEncoder onUnmappableCharacter ( CodingErrorAction newAction ) { if ( newAction == null ) throw new IllegalArgumentException ( "Null action" ) ; unmappableCharacterAction = newAction ; implOnUnmappableCharacter ( newAction ) ; return this ; } | Changes this encoder s action for unmappable - character errors . |
28,213 | public final ByteBuffer encode ( CharBuffer in ) throws CharacterCodingException { int n = ( int ) ( in . remaining ( ) * averageBytesPerChar ( ) ) ; ByteBuffer out = ByteBuffer . allocate ( n ) ; if ( ( n == 0 ) && ( in . remaining ( ) == 0 ) ) return out ; reset ( ) ; for ( ; ; ) { CoderResult cr = in . hasRemaining ( ) ? encode ( in , out , true ) : CoderResult . UNDERFLOW ; if ( cr . isUnderflow ( ) ) cr = flush ( out ) ; if ( cr . isUnderflow ( ) ) break ; if ( cr . isOverflow ( ) ) { n = 2 * n + 1 ; ByteBuffer o = ByteBuffer . allocate ( n ) ; out . flip ( ) ; o . put ( out ) ; out = o ; continue ; } cr . throwException ( ) ; } out . flip ( ) ; return out ; } | Convenience method that encodes the remaining content of a single input character buffer into a newly - allocated byte buffer . |
28,214 | public boolean canEncode ( char c ) { CharBuffer cb = CharBuffer . allocate ( 1 ) ; cb . put ( c ) ; cb . flip ( ) ; return canEncode ( cb ) ; } | Tells whether or not this encoder can encode the given character . |
28,215 | public static Parser makeParser ( ) throws ClassNotFoundException , IllegalAccessException , InstantiationException , NullPointerException , ClassCastException { String className = System . getProperty ( "org.xml.sax.parser" ) ; if ( className == null ) { throw new NullPointerException ( "No value for sax.parser property" ) ; } else { return makeParser ( className ) ; } } | Create a new SAX parser using the org . xml . sax . parser system property . |
28,216 | public static Parser makeParser ( String className ) throws ClassNotFoundException , IllegalAccessException , InstantiationException , ClassCastException { return ( Parser ) NewInstance . newInstance ( NewInstance . getClassLoader ( ) , className ) ; } | Create a new SAX parser object using the class name provided . |
28,217 | public static synchronized X509CertificatePair generateCertificatePair ( byte [ ] encoded ) throws CertificateException { Object key = new Cache . EqualByteArray ( encoded ) ; X509CertificatePair pair = cache . get ( key ) ; if ( pair != null ) { return pair ; } pair = new X509CertificatePair ( encoded ) ; key = new Cache . EqualByteArray ( pair . encoded ) ; cache . put ( key , pair ) ; return pair ; } | Create a X509CertificatePair from its encoding . Uses cache lookup if possible . |
28,218 | public byte [ ] getEncoded ( ) throws CertificateEncodingException { try { if ( encoded == null ) { DerOutputStream tmp = new DerOutputStream ( ) ; emit ( tmp ) ; encoded = tmp . toByteArray ( ) ; } } catch ( IOException ex ) { throw new CertificateEncodingException ( ex . toString ( ) ) ; } return encoded ; } | Return the DER encoded form of the certificate pair . |
28,219 | public void addMatchSetTo ( UnicodeSet toUnionTo ) { int ch ; for ( int i = 0 ; i < pattern . length ( ) ; i += UTF16 . getCharCount ( ch ) ) { ch = UTF16 . charAt ( pattern , i ) ; UnicodeMatcher matcher = data . lookupMatcher ( ch ) ; if ( matcher == null ) { toUnionTo . add ( ch ) ; } else { matcher . addMatchSetTo ( toUnionTo ) ; } } } | Implementation of UnicodeMatcher API . Union the set of all characters that may be matched by this object into the given set . |
28,220 | public void encode ( DerOutputStream out ) throws IOException { DerOutputStream tmp = new DerOutputStream ( ) ; for ( int i = 0 ; i < ids . size ( ) ; i ++ ) { ids . elementAt ( i ) . encode ( tmp ) ; } out . write ( DerValue . tag_Sequence , tmp ) ; } | Encode the policy set to the output stream . |
28,221 | private void makeRulesCompatible ( ) { switch ( startMode ) { case DOM_MODE : startDay = 1 + ( startDay / 7 ) ; startDayOfWeek = Calendar . SUNDAY ; break ; case DOW_GE_DOM_MODE : if ( startDay != 1 ) { startDay = 1 + ( startDay / 7 ) ; } break ; case DOW_LE_DOM_MODE : if ( startDay >= 30 ) { startDay = - 1 ; } else { startDay = 1 + ( startDay / 7 ) ; } break ; } switch ( endMode ) { case DOM_MODE : endDay = 1 + ( endDay / 7 ) ; endDayOfWeek = Calendar . SUNDAY ; break ; case DOW_GE_DOM_MODE : if ( endDay != 1 ) { endDay = 1 + ( endDay / 7 ) ; } break ; case DOW_LE_DOM_MODE : if ( endDay >= 30 ) { endDay = - 1 ; } else { endDay = 1 + ( endDay / 7 ) ; } break ; } switch ( startTimeMode ) { case UTC_TIME : startTime += rawOffset ; break ; } while ( startTime < 0 ) { startTime += millisPerDay ; startDayOfWeek = 1 + ( ( startDayOfWeek + 5 ) % 7 ) ; } while ( startTime >= millisPerDay ) { startTime -= millisPerDay ; startDayOfWeek = 1 + ( startDayOfWeek % 7 ) ; } switch ( endTimeMode ) { case UTC_TIME : endTime += rawOffset + dstSavings ; break ; case STANDARD_TIME : endTime += dstSavings ; } while ( endTime < 0 ) { endTime += millisPerDay ; endDayOfWeek = 1 + ( ( endDayOfWeek + 5 ) % 7 ) ; } while ( endTime >= millisPerDay ) { endTime -= millisPerDay ; endDayOfWeek = 1 + ( endDayOfWeek % 7 ) ; } } | Make rules compatible to 1 . 1 FCS code . Since 1 . 1 FCS code only understands day - of - week - in - month rules we must modify other modes of rules to their approximate equivalent in 1 . 1 FCS terms . This method is used when streaming out objects of this class . After it is called the rules will be modified with a possible loss of information . startMode and endMode will NOT be altered even though semantically they should be set to DOW_IN_MONTH_MODE since the rule modification is only intended to be temporary . |
28,222 | private byte [ ] packRules ( ) { byte [ ] rules = new byte [ 6 ] ; rules [ 0 ] = ( byte ) startDay ; rules [ 1 ] = ( byte ) startDayOfWeek ; rules [ 2 ] = ( byte ) endDay ; rules [ 3 ] = ( byte ) endDayOfWeek ; rules [ 4 ] = ( byte ) startTimeMode ; rules [ 5 ] = ( byte ) endTimeMode ; return rules ; } | Pack the start and end rules into an array of bytes . Only pack data which is not preserved by makeRulesCompatible . |
28,223 | private void unpackRules ( byte [ ] rules ) { startDay = rules [ 0 ] ; startDayOfWeek = rules [ 1 ] ; endDay = rules [ 2 ] ; endDayOfWeek = rules [ 3 ] ; if ( rules . length >= 6 ) { startTimeMode = rules [ 4 ] ; endTimeMode = rules [ 5 ] ; } } | Given an array of bytes produced by packRules interpret them as the start and end rules . |
28,224 | private static < T > T get ( ListIterator < ? extends T > i , int index ) { T obj = null ; int pos = i . nextIndex ( ) ; if ( pos <= index ) { do { obj = i . next ( ) ; } while ( pos ++ < index ) ; } else { do { obj = i . previous ( ) ; } while ( -- pos > index ) ; } return obj ; } | Gets the ith element from the given list by repositioning the specified list listIterator . |
28,225 | public static void shuffle ( List < ? > list ) { Random rnd = r ; if ( rnd == null ) r = rnd = new Random ( ) ; shuffle ( list , rnd ) ; } | Randomly permutes the specified list using a default source of randomness . All permutations occur with approximately equal likelihood . |
28,226 | public static < K , V > Map < K , V > singletonMap ( K key , V value ) { return new SingletonMap < > ( key , value ) ; } | Returns an immutable map mapping only the specified key to the specified value . The returned map is serializable . |
28,227 | public static < T > Enumeration < T > enumeration ( final Collection < T > c ) { return new Enumeration < T > ( ) { private final Iterator < T > i = c . iterator ( ) ; public boolean hasMoreElements ( ) { return i . hasNext ( ) ; } public T nextElement ( ) { return i . next ( ) ; } } ; } | Returns an enumeration over the specified collection . This provides interoperability with legacy APIs that require an enumeration as input . |
28,228 | public static < T > ArrayList < T > list ( Enumeration < T > e ) { ArrayList < T > l = new ArrayList < > ( ) ; while ( e . hasMoreElements ( ) ) l . add ( e . nextElement ( ) ) ; return l ; } | Returns an array list containing the elements returned by the specified enumeration in the order they are returned by the enumeration . This method provides interoperability between legacy APIs that return enumerations and new APIs that require collections . |
28,229 | private ElemExtensionDecl getElemExtensionDecl ( StylesheetRoot stylesheet , String namespace ) { ElemExtensionDecl decl = null ; int n = stylesheet . getGlobalImportCount ( ) ; for ( int i = 0 ; i < n ; i ++ ) { Stylesheet imported = stylesheet . getGlobalImport ( i ) ; for ( ElemTemplateElement child = imported . getFirstChildElem ( ) ; child != null ; child = child . getNextSiblingElem ( ) ) { if ( Constants . ELEMNAME_EXTENSIONDECL == child . getXSLToken ( ) ) { decl = ( ElemExtensionDecl ) child ; String prefix = decl . getPrefix ( ) ; String declNamespace = child . getNamespaceForPrefix ( prefix ) ; if ( namespace . equals ( declNamespace ) ) { return decl ; } } } } return null ; } | Return the ElemExtensionDecl for this extension element |
28,230 | public void execute ( TransformerImpl transformer ) throws TransformerException { if ( transformer . getStylesheet ( ) . isSecureProcessing ( ) ) throw new TransformerException ( XSLMessages . createMessage ( XSLTErrorResources . ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING , new Object [ ] { getRawName ( ) } ) ) ; try { transformer . getResultTreeHandler ( ) . flushPending ( ) ; ExtensionsTable etable = transformer . getExtensionsTable ( ) ; ExtensionHandler nsh = etable . get ( m_extns ) ; if ( null == nsh ) { if ( hasFallbackChildren ( ) ) { executeFallbacks ( transformer ) ; } else { TransformerException te = new TransformerException ( XSLMessages . createMessage ( XSLTErrorResources . ER_CALL_TO_EXT_FAILED , new Object [ ] { getNodeName ( ) } ) ) ; transformer . getErrorListener ( ) . fatalError ( te ) ; } return ; } try { nsh . processElement ( this . getLocalName ( ) , this , transformer , getStylesheet ( ) , this ) ; } catch ( Exception e ) { if ( hasFallbackChildren ( ) ) executeFallbacks ( transformer ) ; else { if ( e instanceof TransformerException ) { TransformerException te = ( TransformerException ) e ; if ( null == te . getLocator ( ) ) te . setLocator ( this ) ; transformer . getErrorListener ( ) . fatalError ( te ) ; } else if ( e instanceof RuntimeException ) { transformer . getErrorListener ( ) . fatalError ( new TransformerException ( e ) ) ; } else { transformer . getErrorListener ( ) . warning ( new TransformerException ( e ) ) ; } } } } catch ( TransformerException e ) { transformer . getErrorListener ( ) . fatalError ( e ) ; } catch ( SAXException se ) { throw new TransformerException ( se ) ; } } | Execute an extension . |
28,231 | public static String normalize ( int char32 , Mode mode , int options ) { if ( mode == NFD && options == 0 ) { String decomposition = Normalizer2 . getNFCInstance ( ) . getDecomposition ( char32 ) ; if ( decomposition == null ) { decomposition = UTF16 . valueOf ( char32 ) ; } return decomposition ; } return normalize ( UTF16 . valueOf ( char32 ) , mode , options ) ; } | Normalize a codepoint according to the given mode |
28,232 | public int current ( ) { if ( bufferPos < buffer . length ( ) || nextNormalize ( ) ) { return buffer . codePointAt ( bufferPos ) ; } else { return DONE ; } } | Return the current character in the normalized text . |
28,233 | public void addReplacementSetTo ( UnicodeSet toUnionTo ) { int ch ; for ( int i = 0 ; i < output . length ( ) ; i += UTF16 . getCharCount ( ch ) ) { ch = UTF16 . charAt ( output , i ) ; UnicodeReplacer r = data . lookupReplacer ( ch ) ; if ( r == null ) { toUnionTo . add ( ch ) ; } else { r . addReplacementSetTo ( toUnionTo ) ; } } } | Union the set of all characters that may output by this object into the given set . |
28,234 | public static String retrieveFieldValueName ( String id , int field , int value , int style , Locale locale ) { if ( field == Calendar . ERA ) { switch ( normalizeCalendarType ( id ) ) { case BUDDHIST_CALENDAR : case ISLAMIC_CALENDAR : value -= 1 ; break ; case JAPANESE_CALENDAR : value += 231 ; break ; default : break ; } } if ( value < 0 ) { return null ; } String [ ] names = getNames ( id , field , style , locale ) ; if ( value >= names . length ) { return null ; } return names [ value ] ; } | use libcore . icu . LocaleData or android . icu . util . Calendar . WeekData instead |
28,235 | public void setContentHandler ( ContentHandler _saxHandler ) { this . m_saxHandler = _saxHandler ; if ( m_lexHandler == null && _saxHandler instanceof LexicalHandler ) { m_lexHandler = ( LexicalHandler ) _saxHandler ; } } | Sets the SAX ContentHandler . |
28,236 | public void startElement ( String uri , String localName , String qName ) throws SAXException { if ( m_state != null ) { m_state . resetState ( getTransformer ( ) ) ; } if ( m_tracer != null ) super . fireStartElem ( qName ) ; } | Receives notification that an element starts but attributes are not fully known yet . |
28,237 | public void characters ( org . w3c . dom . Node node ) throws org . xml . sax . SAXException { if ( m_state != null ) { m_state . setCurrentNode ( node ) ; } String data = node . getNodeValue ( ) ; if ( data != null ) { this . characters ( data ) ; } } | This method gets the node s value as a String and uses that String as if it were an input character notification . |
28,238 | public void addUniqueAttribute ( String qName , String value , int flags ) throws SAXException { addAttribute ( qName , value ) ; } | Add a unique attribute |
28,239 | protected UResourceBundle findTopLevel ( String aKey ) { for ( UResourceBundle res = this ; res != null ; res = res . getParent ( ) ) { UResourceBundle obj = res . handleGet ( aKey , null , this ) ; if ( obj != null ) { return obj ; } } return null ; } | Returns a resource in a given resource that has a given key or null if the resource is not found . |
28,240 | public String getString ( int index ) { ICUResourceBundle temp = ( ICUResourceBundle ) get ( index ) ; if ( temp . getType ( ) == STRING ) { return temp . getString ( ) ; } throw new UResourceTypeMismatchException ( "" ) ; } | Returns the string in a given resource at the specified index . |
28,241 | protected UResourceBundle findTopLevel ( int index ) { for ( UResourceBundle res = this ; res != null ; res = res . getParent ( ) ) { UResourceBundle obj = res . handleGet ( index , null , this ) ; if ( obj != null ) { return obj ; } } return null ; } | Returns a resource in a given resource that has a given index or null if the resource is not found . |
28,242 | public Set < String > keySet ( ) { Set < String > keys = null ; ICUResourceBundle icurb = null ; if ( isTopLevelResource ( ) && this instanceof ICUResourceBundle ) { icurb = ( ICUResourceBundle ) this ; keys = icurb . getTopLevelKeySet ( ) ; } if ( keys == null ) { if ( isTopLevelResource ( ) ) { TreeSet < String > newKeySet ; if ( parent == null ) { newKeySet = new TreeSet < String > ( ) ; } else if ( parent instanceof UResourceBundle ) { newKeySet = new TreeSet < String > ( ( ( UResourceBundle ) parent ) . keySet ( ) ) ; } else { newKeySet = new TreeSet < String > ( ) ; Enumeration < String > parentKeys = parent . getKeys ( ) ; while ( parentKeys . hasMoreElements ( ) ) { newKeySet . add ( parentKeys . nextElement ( ) ) ; } } newKeySet . addAll ( handleKeySet ( ) ) ; keys = Collections . unmodifiableSet ( newKeySet ) ; if ( icurb != null ) { icurb . setTopLevelKeySet ( keys ) ; } } else { return handleKeySet ( ) ; } } return keys ; } | Returns a Set of all keys contained in this ResourceBundle and its parent bundles . |
28,243 | private Object handleGetObjectImpl ( String aKey , UResourceBundle requested ) { Object obj = resolveObject ( aKey , requested ) ; if ( obj == null ) { UResourceBundle parentBundle = getParent ( ) ; if ( parentBundle != null ) { obj = parentBundle . handleGetObjectImpl ( aKey , requested ) ; } if ( obj == null ) throw new MissingResourceException ( "Can't find resource for bundle " + this . getClass ( ) . getName ( ) + ", key " + aKey , this . getClass ( ) . getName ( ) , aKey ) ; } return obj ; } | done twice before throwing a MissingResourceExpection . |
28,244 | private Object resolveObject ( String aKey , UResourceBundle requested ) { if ( getType ( ) == STRING ) { return getString ( ) ; } UResourceBundle obj = handleGet ( aKey , null , requested ) ; if ( obj != null ) { if ( obj . getType ( ) == STRING ) { return obj . getString ( ) ; } try { if ( obj . getType ( ) == ARRAY ) { return obj . handleGetStringArray ( ) ; } } catch ( UResourceTypeMismatchException ex ) { return obj ; } } return obj ; } | string or string array |
28,245 | public static HttpClient < ByteBuf , ByteBuf > newClient ( String host , int port ) { return newClient ( new InetSocketAddress ( host , port ) ) ; } | Creates a new HTTP client instance with the passed host and port for the target server . |
28,246 | public static HttpClient < ByteBuf , ByteBuf > newClient ( ConnectionProviderFactory < ByteBuf , ByteBuf > providerFactory , Observable < Host > hostStream ) { return HttpClientImpl . create ( providerFactory , hostStream ) ; } | Creates a new HTTP client instance using the supplied connection provider . |
28,247 | public static < R , W > HttpServerInterceptorChain < R , W , R , W > start ( ) { return new HttpServerInterceptorChain < > ( new TransformingInterceptor < R , W , R , W > ( ) { public RequestHandler < R , W > intercept ( RequestHandler < R , W > handler ) { return handler ; } } ) ; } | Starts a new interceptor chain . |
28,248 | private static Interceptor < ByteBuf , ByteBuf > sendHello ( ) { return in -> newConnection -> newConnection . writeString ( Observable . just ( "Hello\n" ) ) . concatWith ( in . handle ( newConnection ) ) ; } | Sends a hello on accepting a new connection . |
28,249 | public TrailingHeaders setHeader ( CharSequence name , Object value ) { lastHttpContent . trailingHeaders ( ) . set ( name , value ) ; return this ; } | Overwrites the current value if any of the passed trailing header to the passed value for this request . |
28,250 | public TrailingHeaders setHeader ( CharSequence name , Iterable < Object > values ) { lastHttpContent . trailingHeaders ( ) . set ( name , values ) ; return this ; } | Overwrites the current value if any of the passed trailing header to the passed values for this request . |
28,251 | public void dispose ( ) { if ( onSubscribe . disposed . compareAndSet ( false , true ) ) { for ( Object chunk : onSubscribe . chunks ) { ReferenceCountUtil . release ( chunk ) ; } onSubscribe . chunks . clear ( ) ; } } | Disposes this source . |
28,252 | public void reuse ( Subscriber < ? super PooledConnection < R , W > > connectionSubscriber ) { unsafeNettyChannel ( ) . pipeline ( ) . fireUserEventTriggered ( new ConnectionReuseEvent < > ( connectionSubscriber , this ) ) ; } | This method must be called for reusing the connection i . e . for sending this connection to the passed subscriber . |
28,253 | public static TcpClient < ByteBuf , ByteBuf > newClient ( ConnectionProviderFactory < ByteBuf , ByteBuf > providerFactory , Observable < Host > hostStream ) { return TcpClientImpl . create ( providerFactory , hostStream ) ; } | Creates a new TCP client instance using the supplied connection provider . |
28,254 | public Observable < Void > ignoreInput ( ) { return getInput ( ) . map ( new Func1 < R , Void > ( ) { public Void call ( R r ) { ReferenceCountUtil . release ( r ) ; return null ; } } ) . ignoreElements ( ) ; } | Ignores all input on this connection . |
28,255 | public int getAvailablePermits ( ) { int minPermits = Integer . MAX_VALUE ; for ( PoolLimitDeterminationStrategy strategy : strategies ) { int availablePermits = strategy . getAvailablePermits ( ) ; minPermits = Math . min ( minPermits , availablePermits ) ; } return minPermits ; } | Returns the minimum number of permits available across all strategies . |
28,256 | private static String getPath ( String uri ) { int offset = 0 ; if ( uri . startsWith ( "http://" ) ) { offset = "http://" . length ( ) ; } else if ( uri . startsWith ( "https://" ) ) { offset = "https://" . length ( ) ; } if ( offset == 0 ) { return uri ; } else { int firstSlash = uri . indexOf ( '/' , offset ) ; return - 1 != firstSlash ? uri . substring ( firstSlash ) : uri ; } } | start of the path . |
28,257 | public long getDuration ( TimeUnit targetUnit ) { if ( isRunning ( ) ) { throw new IllegalStateException ( "The clock is not yet stopped." ) ; } return targetUnit . convert ( durationNanos , TimeUnit . NANOSECONDS ) ; } | Returns the duration for which this clock was running in the given timeunit . |
28,258 | public static byte [ ] sha1 ( byte [ ] data ) { try { MessageDigest md = MessageDigest . getInstance ( "SHA1" ) ; return md . digest ( data ) ; } catch ( NoSuchAlgorithmException e ) { throw new InternalError ( "SHA-1 is not supported on this platform - Outdated?" ) ; } } | Performs a SHA - 1 hash on the specified data |
28,259 | public static byte [ ] randomBytes ( int size ) { byte [ ] bytes = new byte [ size ] ; for ( int index = 0 ; index < size ; index ++ ) { bytes [ index ] = ( byte ) randomNumber ( 0 , 255 ) ; } return bytes ; } | Creates an arbitrary number of random bytes |
28,260 | public static boolean isSelinuxFlagInEnabled ( ) { try { Class < ? > c = Class . forName ( "android.os.SystemProperties" ) ; Method get = c . getMethod ( "get" , String . class ) ; String selinux = ( String ) get . invoke ( c , "ro.build.selinux" ) ; return "1" . equals ( selinux ) ; } catch ( Exception ignored ) { } return false ; } | In Development - an idea of ours was to check the if selinux is enforcing - this could be disabled for some rooting apps Checking for selinux mode |
28,261 | public boolean isRootedWithoutBusyBoxCheck ( ) { return detectRootManagementApps ( ) || detectPotentiallyDangerousApps ( ) || checkForBinary ( BINARY_SU ) || checkForDangerousProps ( ) || checkForRWPaths ( ) || detectTestKeys ( ) || checkSuExists ( ) || checkForRootNative ( ) || checkForMagiskBinary ( ) ; } | Run all the checks apart from checking for the busybox binary . This is because it can sometimes be a false positive as some manufacturers leave the binary in production builds . |
28,262 | public boolean detectRootManagementApps ( String [ ] additionalRootManagementApps ) { ArrayList < String > packages = new ArrayList < > ( Arrays . asList ( Const . knownRootAppsPackages ) ) ; if ( additionalRootManagementApps != null && additionalRootManagementApps . length > 0 ) { packages . addAll ( Arrays . asList ( additionalRootManagementApps ) ) ; } return isAnyPackageFromListInstalled ( packages ) ; } | Using the PackageManager check for a list of well known root apps . |
28,263 | public boolean detectPotentiallyDangerousApps ( String [ ] additionalDangerousApps ) { ArrayList < String > packages = new ArrayList < > ( ) ; packages . addAll ( Arrays . asList ( Const . knownDangerousAppsPackages ) ) ; if ( additionalDangerousApps != null && additionalDangerousApps . length > 0 ) { packages . addAll ( Arrays . asList ( additionalDangerousApps ) ) ; } return isAnyPackageFromListInstalled ( packages ) ; } | Using the PackageManager check for a list of well known apps that require root . |
28,264 | public boolean detectRootCloakingApps ( String [ ] additionalRootCloakingApps ) { ArrayList < String > packages = new ArrayList < > ( Arrays . asList ( Const . knownRootCloakingPackages ) ) ; if ( additionalRootCloakingApps != null && additionalRootCloakingApps . length > 0 ) { packages . addAll ( Arrays . asList ( additionalRootCloakingApps ) ) ; } return isAnyPackageFromListInstalled ( packages ) ; } | Using the PackageManager check for a list of well known root cloak apps . |
28,265 | private boolean isAnyPackageFromListInstalled ( List < String > packages ) { boolean result = false ; PackageManager pm = mContext . getPackageManager ( ) ; for ( String packageName : packages ) { try { pm . getPackageInfo ( packageName , 0 ) ; QLog . e ( packageName + " ROOT management app detected!" ) ; result = true ; } catch ( PackageManager . NameNotFoundException e ) { } } return result ; } | Check if any package in the list is installed |
28,266 | public boolean checkForDangerousProps ( ) { final Map < String , String > dangerousProps = new HashMap < > ( ) ; dangerousProps . put ( "ro.debuggable" , "1" ) ; dangerousProps . put ( "ro.secure" , "0" ) ; boolean result = false ; String [ ] lines = propsReader ( ) ; if ( lines == null ) { return false ; } for ( String line : lines ) { for ( String key : dangerousProps . keySet ( ) ) { if ( line . contains ( key ) ) { String badValue = dangerousProps . get ( key ) ; badValue = "[" + badValue + "]" ; if ( line . contains ( badValue ) ) { QLog . v ( key + " = " + badValue + " detected!" ) ; result = true ; } } } } return result ; } | Checks for several system properties for |
28,267 | public boolean checkForRWPaths ( ) { boolean result = false ; String [ ] lines = mountReader ( ) ; if ( lines == null ) { return false ; } for ( String line : lines ) { String [ ] args = line . split ( " " ) ; if ( args . length < 4 ) { QLog . e ( "Error formatting mount line: " + line ) ; continue ; } String mountPoint = args [ 1 ] ; String mountOptions = args [ 3 ] ; for ( String pathToCheck : Const . pathsThatShouldNotBeWrtiable ) { if ( mountPoint . equalsIgnoreCase ( pathToCheck ) ) { for ( String option : mountOptions . split ( "," ) ) { if ( option . equalsIgnoreCase ( "rw" ) ) { QLog . v ( pathToCheck + " path is mounted with rw permissions! " + line ) ; result = true ; break ; } } } } } return result ; } | When you re root you can change the permissions on common system directories this method checks if any of these patha Const . pathsThatShouldNotBeWrtiable are writable . |
28,268 | public boolean checkSuExists ( ) { Process process = null ; try { process = Runtime . getRuntime ( ) . exec ( new String [ ] { "which" , BINARY_SU } ) ; BufferedReader in = new BufferedReader ( new InputStreamReader ( process . getInputStream ( ) ) ) ; return in . readLine ( ) != null ; } catch ( Throwable t ) { return false ; } finally { if ( process != null ) process . destroy ( ) ; } } | A variation on the checking for SU this attempts a which su |
28,269 | public Observable < BackupLongTermRetentionPolicyInner > getAsync ( String resourceGroupName , String serverName , String databaseName ) { return getWithServiceResponseAsync ( resourceGroupName , serverName , databaseName ) . map ( new Func1 < ServiceResponse < BackupLongTermRetentionPolicyInner > , BackupLongTermRetentionPolicyInner > ( ) { public BackupLongTermRetentionPolicyInner call ( ServiceResponse < BackupLongTermRetentionPolicyInner > response ) { return response . body ( ) ; } } ) ; } | Returns a database backup long term retention policy . |
28,270 | public static String bytesToBase64Url ( byte [ ] bytes ) { String result = ( new String ( Base64 . encodeBase64 ( bytes ) , MESSAGE_ENCODING ) ) . replace ( "=" , "" ) . replace ( "\\" , "" ) . replace ( '+' , '-' ) . replace ( '/' , '_' ) ; return result ; } | Convert bytes array to Base64Url string . |
28,271 | public static JsonWebKey jsonWebKeyFromString ( String jwkString ) throws IOException { ObjectMapper mapper = new ObjectMapper ( ) ; return mapper . readValue ( jwkString , JsonWebKey . class ) ; } | Convert serialized JsonWebKey string to JsonWebKey object . |
28,272 | public static JsonWebKey generateJsonWebKey ( ) { try { final KeyPairGenerator generator = KeyPairGenerator . getInstance ( "RSA" ) ; generator . initialize ( 2048 ) ; KeyPair clientRsaKeyPair = generator . generateKeyPair ( ) ; JsonWebKey result = JsonWebKey . fromRSA ( clientRsaKeyPair ) ; result . withKid ( UUID . randomUUID ( ) . toString ( ) ) ; return result ; } catch ( NoSuchAlgorithmException e ) { throw new RuntimeException ( e ) ; } } | Generates new JsonWebKey with random KeyID . |
28,273 | public static JsonWebKey getJwkWithPublicKeyOnly ( JsonWebKey jwk ) { KeyPair publicOnly = jwk . toRSA ( false ) ; JsonWebKey jsonkeyPublic = JsonWebKey . fromRSA ( publicOnly ) ; jsonkeyPublic . withKid ( jwk . kid ( ) ) ; jsonkeyPublic . withKeyOps ( Arrays . asList ( JsonWebKeyOperation . ENCRYPT , JsonWebKeyOperation . WRAP_KEY , JsonWebKeyOperation . VERIFY ) ) ; return jsonkeyPublic ; } | Converts JsonWebKey with private key to JsonWebKey with public key only . |
28,274 | public Observable < Page < DatabaseOperationInner > > listByDatabaseNextAsync ( final String nextPageLink ) { return listByDatabaseNextWithServiceResponseAsync ( nextPageLink ) . map ( new Func1 < ServiceResponse < Page < DatabaseOperationInner > > , Page < DatabaseOperationInner > > ( ) { public Page < DatabaseOperationInner > call ( ServiceResponse < Page < DatabaseOperationInner > > response ) { return response . body ( ) ; } } ) ; } | Gets a list of operations performed on the database . |
28,275 | public Observable < List < ApplicationInsightsComponentAPIKeyInner > > listAsync ( String resourceGroupName , String resourceName ) { return listWithServiceResponseAsync ( resourceGroupName , resourceName ) . map ( new Func1 < ServiceResponse < List < ApplicationInsightsComponentAPIKeyInner > > , List < ApplicationInsightsComponentAPIKeyInner > > ( ) { public List < ApplicationInsightsComponentAPIKeyInner > call ( ServiceResponse < List < ApplicationInsightsComponentAPIKeyInner > > response ) { return response . body ( ) ; } } ) ; } | Gets a list of API keys of an Application Insights component . |
28,276 | public CertificateItem withX509Thumbprint ( byte [ ] x509Thumbprint ) { if ( x509Thumbprint == null ) { this . x509Thumbprint = null ; } else { this . x509Thumbprint = Base64Url . encode ( x509Thumbprint ) ; } return this ; } | Set the x509Thumbprint value . |
28,277 | public void beginDelete ( String resourceGroupName , String virtualNetworkName , String subnetName ) { beginDeleteWithServiceResponseAsync ( resourceGroupName , virtualNetworkName , subnetName ) . toBlocking ( ) . single ( ) . body ( ) ; } | Deletes the specified subnet . |
28,278 | public void beginDelete ( String resourceGroupName , String serviceEndpointPolicyName ) { beginDeleteWithServiceResponseAsync ( resourceGroupName , serviceEndpointPolicyName ) . toBlocking ( ) . single ( ) . body ( ) ; } | Deletes the specified service endpoint policy . |
28,279 | public static EntityTypeActionOperation < String > getProtectionKeyId ( ContentKeyType contentKeyType ) { return new GetProtectionKeyIdActionOperation ( "GetProtectionKeyId" ) . addQueryParameter ( "contentKeyType" , String . format ( "%d" , contentKeyType . getCode ( ) ) ) . setAcceptType ( MediaType . APPLICATION_XML_TYPE ) ; } | Gets the protection key id . |
28,280 | public static EntityTypeActionOperation < String > getProtectionKey ( String protectionKeyId ) { return new GetProtectionKeyActionOperation ( "GetProtectionKey" ) . addQueryParameter ( "ProtectionKeyId" , String . format ( "'%s'" , protectionKeyId ) ) . setAcceptType ( MediaType . APPLICATION_XML_TYPE ) ; } | Gets the protection key . |
28,281 | public Observable < ServerInner > beginUpdateAsync ( String resourceGroupName , String serverName , ServerUpdateParameters parameters ) { return beginUpdateWithServiceResponseAsync ( resourceGroupName , serverName , parameters ) . map ( new Func1 < ServiceResponse < ServerInner > , ServerInner > ( ) { public ServerInner call ( ServiceResponse < ServerInner > response ) { return response . body ( ) ; } } ) ; } | Updates an existing server . The request body can contain one to many of the properties present in the normal server definition . |
28,282 | public Observable < Page < ServerInner > > listByResourceGroupAsync ( String resourceGroupName ) { return listByResourceGroupWithServiceResponseAsync ( resourceGroupName ) . map ( new Func1 < ServiceResponse < List < ServerInner > > , Page < ServerInner > > ( ) { public Page < ServerInner > call ( ServiceResponse < List < ServerInner > > response ) { PageImpl < ServerInner > page = new PageImpl < > ( ) ; page . setItems ( response . body ( ) ) ; return page ; } } ) ; } | List all the servers in a given resource group . |
28,283 | public void delete ( String resourceGroupName , String snapshotName ) { deleteWithServiceResponseAsync ( resourceGroupName , snapshotName ) . toBlocking ( ) . last ( ) . body ( ) ; } | Deletes a snapshot . |
28,284 | public ServiceFuture < AccessUriInner > beginGrantAccessAsync ( String resourceGroupName , String snapshotName , GrantAccessData grantAccessData , final ServiceCallback < AccessUriInner > serviceCallback ) { return ServiceFuture . fromResponse ( beginGrantAccessWithServiceResponseAsync ( resourceGroupName , snapshotName , grantAccessData ) , serviceCallback ) ; } | Grants access to a snapshot . |
28,285 | public Observable < UserInner > getAsync ( String deviceName , String name , String resourceGroupName ) { return getWithServiceResponseAsync ( deviceName , name , resourceGroupName ) . map ( new Func1 < ServiceResponse < UserInner > , UserInner > ( ) { public UserInner call ( ServiceResponse < UserInner > response ) { return response . body ( ) ; } } ) ; } | Gets the properties of the specified user . |
28,286 | public void commit ( ) throws ServiceBusException , InterruptedException { if ( this . messagingFactory == null ) { throw new ServiceBusException ( false , "MessagingFactory should not be null" ) ; } this . messagingFactory . endTransaction ( this , true ) ; } | Commits the transaction |
28,287 | public CompletableFuture < Void > commitAsync ( ) { if ( this . messagingFactory == null ) { CompletableFuture < Void > exceptionCompletion = new CompletableFuture < > ( ) ; exceptionCompletion . completeExceptionally ( new ServiceBusException ( false , "MessagingFactory should not be null" ) ) ; return exceptionCompletion ; } return this . messagingFactory . endTransactionAsync ( this , true ) ; } | Asynchronously commits the transaction |
28,288 | public void rollback ( ) throws ServiceBusException , InterruptedException { if ( this . messagingFactory == null ) { throw new ServiceBusException ( false , "MessagingFactory should not be null" ) ; } this . messagingFactory . endTransaction ( this , false ) ; } | Rollback the transaction |
28,289 | public CompletableFuture < Void > rollbackAsync ( ) { if ( this . messagingFactory == null ) { CompletableFuture < Void > exceptionCompletion = new CompletableFuture < > ( ) ; exceptionCompletion . completeExceptionally ( new ServiceBusException ( false , "MessagingFactory should not be null" ) ) ; return exceptionCompletion ; } return this . messagingFactory . endTransactionAsync ( this , false ) ; } | Asynchronously rollback the transaction . |
28,290 | public static IMessageSender createMessageSenderFromEntityPath ( MessagingFactory messagingFactory , String entityPath ) throws InterruptedException , ServiceBusException { return Utils . completeFuture ( createMessageSenderFromEntityPathAsync ( messagingFactory , entityPath ) ) ; } | Creates a message sender to the entity . |
28,291 | public static IMessageSender createTransferMessageSenderFromEntityPath ( MessagingFactory messagingFactory , String entityPath , String viaEntityPath ) throws InterruptedException , ServiceBusException { return Utils . completeFuture ( createTransferMessageSenderFromEntityPathAsync ( messagingFactory , entityPath , viaEntityPath ) ) ; } | Creates a transfer message sender . This sender sends message to destination entity via another entity . |
28,292 | public static CompletableFuture < IMessageSender > createMessageSenderFromConnectionStringBuilderAsync ( ConnectionStringBuilder amqpConnectionStringBuilder ) { Utils . assertNonNull ( "amqpConnectionStringBuilder" , amqpConnectionStringBuilder ) ; return createMessageSenderFromEntityPathAsync ( amqpConnectionStringBuilder . getEndpoint ( ) , amqpConnectionStringBuilder . getEntityPath ( ) , Util . getClientSettingsFromConnectionStringBuilder ( amqpConnectionStringBuilder ) ) ; } | Create message sender asynchronously from ConnectionStringBuilder |
28,293 | public static CompletableFuture < IMessageSender > createTransferMessageSenderFromEntityPathAsync ( MessagingFactory messagingFactory , String entityPath , String viaEntityPath ) { Utils . assertNonNull ( "messagingFactory" , messagingFactory ) ; MessageSender sender = new MessageSender ( messagingFactory , viaEntityPath , entityPath , null ) ; return sender . initializeAsync ( ) . thenApply ( ( v ) -> sender ) ; } | Creates a transfer message sender asynchronously . This sender sends message to destination entity via another entity . |
28,294 | public static IMessageReceiver createMessageReceiverFromEntityPath ( URI namespaceEndpointURI , String entityPath , ClientSettings clientSettings ) throws InterruptedException , ServiceBusException { return Utils . completeFuture ( createMessageReceiverFromEntityPathAsync ( namespaceEndpointURI , entityPath , clientSettings ) ) ; } | Creates a message receiver to the entity using the client settings in PeekLock mode |
28,295 | public void beginDelete ( String resourceGroupName , String registryName , String replicationName ) { beginDeleteWithServiceResponseAsync ( resourceGroupName , registryName , replicationName ) . toBlocking ( ) . single ( ) . body ( ) ; } | Deletes a replication from a container registry . |
28,296 | public SwaggerMethodParser methodParser ( Method swaggerMethod ) { SwaggerMethodParser result = methodParsers . get ( swaggerMethod ) ; if ( result == null ) { result = new SwaggerMethodParser ( swaggerMethod , serializer , host ( ) ) ; methodParsers . put ( swaggerMethod , result ) ; } return result ; } | Get the method parser that is associated with the provided swaggerMethod . The method parser can be used to get details about the Swagger REST API call . |
28,297 | public Observable < AgentRegistrationInner > getAsync ( String resourceGroupName , String automationAccountName ) { return getWithServiceResponseAsync ( resourceGroupName , automationAccountName ) . map ( new Func1 < ServiceResponse < AgentRegistrationInner > , AgentRegistrationInner > ( ) { public AgentRegistrationInner call ( ServiceResponse < AgentRegistrationInner > response ) { return response . body ( ) ; } } ) ; } | Retrieve the automation agent registration information . |
28,298 | public Observable < OperationStatusResponseInner > beginRedeployAsync ( String resourceGroupName , String vmName ) { return beginRedeployWithServiceResponseAsync ( resourceGroupName , vmName ) . map ( new Func1 < ServiceResponse < OperationStatusResponseInner > , OperationStatusResponseInner > ( ) { public OperationStatusResponseInner call ( ServiceResponse < OperationStatusResponseInner > response ) { return response . body ( ) ; } } ) ; } | The operation to redeploy a virtual machine . |
28,299 | public String escape ( String original ) { StringBuilder output = new StringBuilder ( ) ; for ( int i = 0 ; i != utf16ToAscii ( original ) . length ( ) ; i ++ ) { char c = original . charAt ( i ) ; if ( c == ' ' ) { output . append ( usePlusForSpace ? "+" : HEX [ ' ' ] ) ; } else if ( c >= 'a' && c <= 'z' ) { output . append ( c ) ; } else if ( c >= 'A' && c <= 'Z' ) { output . append ( c ) ; } else if ( c >= '0' && c <= '9' ) { output . append ( c ) ; } else if ( safeChars . contains ( c ) ) { output . append ( c ) ; } else { output . append ( HEX [ c ] ) ; } } return output . toString ( ) ; } | Escapes a string with the current settings on the escaper . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.