signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class WSJdbcUtil { /** * Utility method to obtain the unique identifier of the data source associated with a JDBC wrapper . * @ param jdbcWrapper proxy for a JDBC resource . * @ return JNDI name of the data source if it has one , otherwise the config . displayId of the data source . */ public static String g...
DSConfig config = jdbcWrapper . dsConfig . get ( ) ; return config . jndiName == null ? config . id : config . jndiName ;
public class RegionDiskClient { /** * Retrieves the list of persistent disks contained within the specified region . * < p > Sample code : * < pre > < code > * try ( RegionDiskClient regionDiskClient = RegionDiskClient . create ( ) ) { * ProjectRegionName region = ProjectRegionName . of ( " [ PROJECT ] " , " [ ...
ListRegionDisksHttpRequest request = ListRegionDisksHttpRequest . newBuilder ( ) . setRegion ( region == null ? null : region . toString ( ) ) . build ( ) ; return listRegionDisks ( request ) ;
public class MetricServiceClient { /** * Lists metric descriptors that match a filter . This method does not require a Stackdriver * account . * < p > Sample code : * < pre > < code > * try ( MetricServiceClient metricServiceClient = MetricServiceClient . create ( ) ) { * ProjectName name = ProjectName . of (...
ListMetricDescriptorsRequest request = ListMetricDescriptorsRequest . newBuilder ( ) . setName ( name == null ? null : name . toString ( ) ) . build ( ) ; return listMetricDescriptors ( request ) ;
public class SplitIndexWriter { /** * Generate separate index files , for each Unicode character , listing all * the members starting with the particular unicode character . * @ param indexbuilder IndexBuilder built by { @ link IndexBuilder } * @ throws DocletAbortException */ public static void generate ( Config...
SplitIndexWriter indexgen ; DocPath filename = DocPath . empty ; DocPath path = DocPaths . INDEX_FILES ; try { Set < Object > keys = new TreeSet < > ( Arrays . asList ( indexbuilder . elements ( ) ) ) ; keys . addAll ( configuration . tagSearchIndexKeys ) ; List < Object > elements = new ArrayList < > ( keys ) ; ListIt...
public class DBInputFormat { /** * { @ inheritDoc } */ public InputSplit [ ] getSplits ( JobConf job , int chunks ) throws IOException { } }
try { Statement statement = connection . createStatement ( ) ; ResultSet results = statement . executeQuery ( getCountQuery ( ) ) ; results . next ( ) ; long count = results . getLong ( 1 ) ; long chunkSize = ( count / chunks ) ; results . close ( ) ; statement . close ( ) ; InputSplit [ ] splits = new InputSplit [ chu...
public class JstlBundleInterceptor { /** * Sets the Stripes error and field resource bundles in the request , if their names have been configured . */ @ Override protected void setOtherResourceBundles ( HttpServletRequest request ) { } }
Locale locale = request . getLocale ( ) ; if ( errorBundleName != null ) { ResourceBundle errorBundle = getLocalizationBundleFactory ( ) . getErrorMessageBundle ( locale ) ; Config . set ( request , errorBundleName , new LocalizationContext ( errorBundle , locale ) ) ; LOGGER . debug ( "Loaded Stripes error message bun...
public class JavacParser { /** * Skip forward until a suitable stop token is found . */ private void skip ( boolean stopAtImport , boolean stopAtMemberDecl , boolean stopAtIdentifier , boolean stopAtStatement ) { } }
while ( true ) { switch ( token . kind ) { case SEMI : nextToken ( ) ; return ; case PUBLIC : case FINAL : case ABSTRACT : case MONKEYS_AT : case EOF : case CLASS : case INTERFACE : case ENUM : return ; case IMPORT : if ( stopAtImport ) return ; break ; case LBRACE : case RBRACE : case PRIVATE : case PROTECTED : case S...
public class RegexUtils { /** * Returns true if the string matches any of the specified regexes . * @ param str the string to match * @ param regexes the regexes used for matching * @ return true if the string matches one or more of the regexes */ public static boolean matchesAny ( String str , String ... regexes...
if ( ArrayUtils . isNotEmpty ( regexes ) ) { return matchesAny ( str , Arrays . asList ( regexes ) ) ; } else { return false ; }
public class CountingMemoryCache { /** * Caches the given key - value pair . * < p > Important : the client should use the returned reference instead of the original one . * It is the caller ' s responsibility to close the returned reference once not needed anymore . * @ return the new reference to be used , null...
return cache ( key , valueRef , null ) ;
public class CommonOps_ZDRM { /** * Computes the complex conjugate of the input matrix . < br > * < br > * real < sub > i , j < / sub > = real < sub > i , j < / sub > < br > * imaginary < sub > i , j < / sub > = - 1 * imaginary < sub > i , j < / sub > < br > * @ param input Input matrix . Not modified . * @ p...
if ( input . numCols != output . numCols || input . numRows != output . numRows ) { throw new IllegalArgumentException ( "The matrices are not all the same dimension." ) ; } final int length = input . getDataLength ( ) ; for ( int i = 0 ; i < length ; i += 2 ) { output . data [ i ] = input . data [ i ] ; output . data ...
public class BasicQueryInputProcessor { /** * Removes blocks - such as comments and other possible blocks * @ param originalSql original SQL * @ return SQL string with removed ( they will be filled with { @ link # FILL _ SYMBOL } blocks */ private String removeBlocks ( String originalSql ) { } }
StringBuilder cleanedSql = new StringBuilder ( originalSql . length ( ) ) ; Pattern regexPattern = null ; Matcher regexMatcher = null ; regexPattern = Pattern . compile ( getRegexSkipBlockSearch ( ) , Pattern . CASE_INSENSITIVE ) ; regexMatcher = regexPattern . matcher ( originalSql + "\n" ) ; int prevBlockEnd = 0 ; in...
public class ExpressionUtils { /** * Create a new Operation expression * @ param type type of expression * @ param operator operator * @ param args operation arguments * @ return operation expression */ @ SuppressWarnings ( "unchecked" ) public static < T > Operation < T > operation ( Class < ? extends T > type...
if ( type . equals ( Boolean . class ) ) { return ( Operation < T > ) new PredicateOperation ( operator , args ) ; } else { return new OperationImpl < T > ( type , operator , args ) ; }
public class TreeMultiMap { /** * { @ inheritDoc } This method runs in constant time , except for the first * time called on a sub - map , when it runs in linear time to the number of * values . */ public int range ( ) { } }
// the current range isn ' t accurate , loop through the values and count if ( recalculateRange ) { recalculateRange = false ; range = 0 ; for ( V v : values ( ) ) range ++ ; } return range ;
public class Metadata { /** * Adds a metadata value to the dictionary . * @ param name the name * @ param value the value */ public void add ( String name , TiffObject value ) { } }
if ( ! metadata . containsKey ( name ) ) { metadata . put ( name , new MetadataObject ( ) ) ; } metadata . get ( name ) . getObjectList ( ) . add ( value ) ;
public class JmxMonitor { /** * Returns the system CPU usage , in percents , between 0 and 100. * @ return total CPU usage of the current OS */ @ Override protected int detectTotalCpuPercent ( ) throws Exception { } }
Double value = ( Double ) mxBean . getSystemLoadAverage ( ) ; return ( int ) Math . max ( value * 100d , 0d ) ;
public class DoubleMatrix { /** * array [ j ] = Aij * @ param i * @ param array * @ param offset */ public void getRow ( int i , double [ ] array , int offset ) { } }
int n = cols ; for ( int j = 0 ; j < n ; j ++ ) { array [ j + offset ] = get ( i , j ) ; }
public class InvertedIndex { /** * Query list . * @ param keys the keys * @ return the list */ public Set < DOCUMENT > query ( Iterable < KEY > keys ) { } }
return query ( keys , d -> true ) ;
public class CassandraDataHandlerBase { /** * Scroll over counter super column . * @ param m * the m * @ param relationNames * the relation names * @ param isWrapReq * the is wrap req * @ param relations * the relations * @ param entityType * the entity type * @ param superColumn * the super col...
for ( CounterColumn column : superColumn . getColumns ( ) ) { String thriftColumnName = PropertyAccessorFactory . STRING . fromBytes ( String . class , column . getName ( ) ) ; String thriftColumnValue = new Long ( column . getValue ( ) ) . toString ( ) ; PropertyAccessorHelper . set ( embeddedObject , superColumnField...
public class CmsDomUtil { /** * Sets a CSS class to show or hide a given overlay . Will not add an overlay to the element . < p > * @ param element the parent element of the overlay * @ param show < code > true < / code > to show the overlay */ public static void showOverlay ( Element element , boolean show ) { } }
if ( show ) { element . removeClassName ( I_CmsLayoutBundle . INSTANCE . generalCss ( ) . hideOverlay ( ) ) ; } else { element . addClassName ( I_CmsLayoutBundle . INSTANCE . generalCss ( ) . hideOverlay ( ) ) ; }
public class HttpRequest { /** * Force a removeField . This call ignores the message state and forces a field to be removed * from the request . It is required for the handling of the Connection field . * @ param name The field name * @ return The old value or null . */ Object forceRemoveField ( String name ) { }...
int saved_state = _state ; try { _state = __MSG_EDITABLE ; return removeField ( name ) ; } finally { _state = saved_state ; }
public class FYShuffle { /** * Randomly shuffle the elements in an array * @ param < E > the type of elements in this arrays . * @ param array an array of objects to shuffle . */ public static < E > void shuffle ( E [ ] array ) { } }
int swapPlace = - 1 ; for ( int i = 0 ; i < array . length ; i ++ ) { swapPlace = ( int ) ( Math . random ( ) * ( array . length - 1 ) ) ; TrivialSwap . swap ( array , i , swapPlace ) ; }
public class DeadAssignmentsElimination { /** * Try to remove useless assignments from a control flow graph that has been * annotated with liveness information . * @ param t The node traversal . * @ param cfg The control flow graph of the program annotated with liveness * information . */ private void tryRemove...
Iterable < DiGraphNode < Node , Branch > > nodes = cfg . getDirectedGraphNodes ( ) ; for ( DiGraphNode < Node , Branch > cfgNode : nodes ) { FlowState < LiveVariableLattice > state = cfgNode . getAnnotation ( ) ; Node n = cfgNode . getValue ( ) ; if ( n == null ) { continue ; } switch ( n . getToken ( ) ) { case IF : c...
public class AbstractResultSetWrapper { /** * { @ inheritDoc } * @ see java . sql . ResultSet # updateClob ( int , java . io . Reader , long ) */ @ Override public void updateClob ( final int columnIndex , final Reader reader , final long length ) throws SQLException { } }
wrapped . updateClob ( columnIndex , reader , length ) ;
public class PolicyEventsInner { /** * Queries policy events for the resources under the resource group . * @ param subscriptionId Microsoft Azure subscription ID . * @ param resourceGroupName Resource group name . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ throws QueryFail...
return listQueryResultsForResourceGroupWithServiceResponseAsync ( subscriptionId , resourceGroupName ) . toBlocking ( ) . single ( ) . body ( ) ;
public class Stream { /** * Implementation method responsible of producing an Iterator over the elements of the Stream . * This method is called by { @ link # iterator ( ) } with the guarantee that it is called at most * once and with the Stream in the < i > available < / i > state . If the returned Iterator implem...
final ToHandlerIterator < T > iterator = new ToHandlerIterator < T > ( this ) ; iterator . submit ( ) ; return iterator ;
public class ForeignDestination { /** * / * ( non - Javadoc ) * @ see com . ibm . ws . sib . processor . runtime . SIMPForeignDestinationControllable # getTargetForeignBus ( ) */ public SIMPForeignBusControllable getTargetForeignBus ( ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getTargetForeignBus" ) ; // Lookup foreign bus BusHandler foreignBus = null ; try { foreignBus = messageProcessor . getDestinationManager ( ) . findBus ( foreignDest . getBus ( ) ) ; } catch ( SIException e ) { FFDCFilter ....
public class RDBMEntityLockStore { /** * Adds the lock to the underlying store . * @ param lock */ @ Override public void add ( IEntityLock lock ) throws LockingException { } }
Connection conn = null ; try { conn = RDBMServices . getConnection ( ) ; primDeleteExpired ( new Date ( ) , lock . getEntityType ( ) , lock . getEntityKey ( ) , conn ) ; primAdd ( lock , conn ) ; } catch ( SQLException sqle ) { throw new LockingException ( "Problem creating " + lock , sqle ) ; } finally { RDBMServices ...
public class Math { /** * Swap two arrays . */ public static < E > void swap ( E [ ] x , E [ ] y ) { } }
if ( x . length != y . length ) { throw new IllegalArgumentException ( String . format ( "Arrays have different length: x[%d], y[%d]" , x . length , y . length ) ) ; } for ( int i = 0 ; i < x . length ; i ++ ) { E s = x [ i ] ; x [ i ] = y [ i ] ; y [ i ] = s ; }
public class Matrix4f { /** * Apply an asymmetric off - center perspective projection frustum transformation for a right - handed coordinate system * using the given NDC z range to this matrix and store the result in < code > dest < / code > . * The given angles < code > offAngleX < / code > and < code > offAngleY ...
if ( ( properties & PROPERTY_IDENTITY ) != 0 ) return dest . setPerspectiveOffCenter ( fovy , offAngleX , offAngleY , aspect , zNear , zFar , zZeroToOne ) ; return perspectiveOffCenterGeneric ( fovy , offAngleX , offAngleY , aspect , zNear , zFar , zZeroToOne , dest ) ;
public class Marshaller { /** * Creates an IncompleteKey . * @ param parent * the parent key , may be < code > null < / code > . */ private void createIncompleteKey ( Key parent ) { } }
String kind = entityMetadata . getKind ( ) ; if ( parent == null ) { key = entityManager . newNativeKeyFactory ( ) . setKind ( kind ) . newKey ( ) ; } else { key = IncompleteKey . newBuilder ( parent , kind ) . build ( ) ; }
public class ServiceUtils { /** * Find instances of { @ code clazz } among the { @ code instances } . * @ param clazz searched class * @ param instances instances looked at * @ param < T > type of the searched instances * @ return the list of compatible instances */ public static < T > Collection < T > findAmon...
return findStreamAmongst ( clazz , instances ) . collect ( Collectors . toList ( ) ) ;
public class BeanContextServicesSupport { /** * Fires a < code > BeanContextServiceRevokedEvent < / code > to registered < code > BeanContextServicesListener < / code > s . * @ param event * the event */ protected final void fireServiceRevoked ( BeanContextServiceRevokedEvent event ) { } }
Object listeners [ ] ; synchronized ( bcsListeners ) { listeners = bcsListeners . toArray ( ) ; } for ( int i = 0 ; i < listeners . length ; i ++ ) { BeanContextServicesListener l = ( BeanContextServicesListener ) listeners [ i ] ; l . serviceRevoked ( event ) ; }
public class ChildProcAppHandle { /** * Parses the logs of { @ code spark - submit } and returns the last exception thrown . * Since { @ link SparkLauncher } runs { @ code spark - submit } in a sub - process , it ' s difficult to * accurately retrieve the full { @ link Throwable } from the { @ code spark - submit }...
return redirector != null ? Optional . ofNullable ( redirector . getError ( ) ) : Optional . empty ( ) ;
public class GetCurrentUsersRecentlyPlayedTracksRequest { /** * Get an user ' s recently played tracks . * @ return An user ' s recently played tracks . * @ throws IOException In case of networking issues . * @ throws SpotifyWebApiException The Web API returned an error further specified in this exception ' s roo...
return new PlayHistory . JsonUtil ( ) . createModelObjectPagingCursorbased ( getJson ( ) ) ;
public class ChargingStationOcpp15SoapClient { /** * { @ inheritDoc } */ @ Override public boolean hardReset ( ChargingStationId id ) { } }
LOG . info ( "Requesting hard reset on {}" , id ) ; return reset ( id , ResetType . HARD ) ;
public class Levenshtein { /** * Returns an new n - Gram distance ( Kondrak ) instance with compare target string * @ see NGram * @ param baseTarget * @ param compareTarget * @ return */ public static < T extends Levenshtein > T NGram ( String baseTarget , String compareTarget ) { } }
return NGram ( baseTarget , compareTarget , null ) ;
public class CRFFeatureExporter { /** * Output features that have already been converted into features * ( using documentToDataAndLabels ) in format suitable for CRFSuite * Format is with one line per token using the following format * label feat1 feat2 . . . * ( where each space is actually a tab ) * Each do...
try { PrintWriter pw = IOUtils . getPrintWriter ( exportFile ) ; for ( int i = 0 ; i < docsData . length ; i ++ ) { for ( int j = 0 ; j < docsData [ i ] . length ; j ++ ) { StringBuilder sb = new StringBuilder ( ) ; int label = labels [ i ] [ j ] ; sb . append ( classifier . classIndex . get ( label ) ) ; for ( int k =...
public class TransferFsImage { /** * Client - side Method to fetch file from a server * Copies the response from the URL to a list of local files . * @ param dstStorage if an error occurs writing to one of the files , * this storage object will be notified . * @ Return a digest of the received file if getChecks...
byte [ ] buf = new byte [ BUFFER_SIZE ] ; String str = url . toString ( ) ; HttpURLConnection connection = ( HttpURLConnection ) url . openConnection ( ) ; int timeout = getHttpTimeout ( dstStorage ) ; connection . setConnectTimeout ( timeout ) ; if ( connection . getResponseCode ( ) != HttpURLConnection . HTTP_OK ) { ...
public class KeyDispatcher { /** * documentation inherited from interface KeyEventDispatcher */ public boolean dispatchKeyEvent ( KeyEvent e ) { } }
int lsize = _listeners . size ( ) ; switch ( e . getID ( ) ) { case KeyEvent . KEY_TYPED : // dispatch to all the global listeners for ( int ii = 0 ; ii < lsize ; ii ++ ) { _listeners . get ( ii ) . keyTyped ( e ) ; } // see if a chat grabber needs to grab it if ( _curChatGrabber != null ) { Component target = e . getC...
public class Fraction { /** * Compares this object to another based on size . * Note : this class has a natural ordering that is inconsistent with equals , because , for example , equals treats 1/2 * and 2/4 as different , whereas compareTo treats them as equal . * @ param other * the object to compare to * @...
if ( this == other ) { return 0 ; } if ( numerator == other . numerator && denominator == other . denominator ) { return 0 ; } // otherwise see which is less final long first = ( long ) numerator * ( long ) other . denominator ; final long second = ( long ) other . numerator * ( long ) denominator ; if ( first == secon...
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link BridgeFurnitureType } { @ code > } * @ param value * Java instance representing xml element ' s value . * @ return * the new instance of { @ link JAXBElement } { @ code < } { @ link BridgeFurnitureType } { @ co...
return new JAXBElement < BridgeFurnitureType > ( _BridgeFurniture_QNAME , BridgeFurnitureType . class , null , value ) ;
public class MessageBirdServiceImpl { /** * Actually sends a HTTP request and returns its body and HTTP status code . * @ param method HTTP method . * @ param url Absolute URL . * @ param payload Payload to JSON encode for the request body . May be null . * @ param < P > Type of the payload . * @ return APIRe...
HttpURLConnection connection = null ; InputStream inputStream = null ; if ( METHOD_PATCH . equalsIgnoreCase ( method ) ) { // It ' d perhaps be cleaner to call this in the constructor , but // we ' d then need to throw GeneralExceptions from there . This means // it wouldn ' t be possible to declare AND initialize _ in...
public class AbstractReady { /** * { @ inheritDoc } */ @ Override public final < C extends Command > List < C > getCommands ( final UniqueKey < C > commandKey ) { } }
localFacade ( ) . globalFacade ( ) . trackEvent ( JRebirthEventType . ACCESS_COMMAND , this . getClass ( ) , commandKey . classField ( ) ) ; return localFacade ( ) . globalFacade ( ) . commandFacade ( ) . retrieveMany ( commandKey ) ;
public class ObjectCreator { /** * Instantaite an Object instance , requires a constractor with parameters * @ param classObject * , Class object representing the object type to be instantiated * @ param params * an array including the required parameters to instantaite the * object * @ return the instantai...
Constructor [ ] constructors = classObject . getConstructors ( ) ; Object object = null ; for ( int counter = 0 ; counter < constructors . length ; counter ++ ) { try { object = constructors [ counter ] . newInstance ( params ) ; } catch ( Exception e ) { if ( e instanceof InvocationTargetException ) ( ( InvocationTarg...
public class MoreCollectors { /** * Returns a { @ code Collector } which performs the bitwise - and operation of a * integer - valued function applied to the input elements . If no elements are * present , the result is empty { @ link OptionalInt } . * This method returns a * < a href = " package - summary . ht...
return new CancellableCollectorImpl < > ( PrimitiveBox :: new , ( acc , t ) -> { if ( ! acc . b ) { acc . i = mapper . applyAsInt ( t ) ; acc . b = true ; } else { acc . i &= mapper . applyAsInt ( t ) ; } } , ( acc1 , acc2 ) -> { if ( ! acc1 . b ) return acc2 ; if ( ! acc2 . b ) return acc1 ; acc1 . i &= acc2 . i ; ret...
public class PropNbLoops { @ Override public void propagate ( int evtmask ) throws ContradictionException { } }
int min = 0 ; int max = 0 ; ISet nodes = g . getPotentialNodes ( ) ; for ( int i : nodes ) { if ( g . getMandSuccOrNeighOf ( i ) . contains ( i ) ) { min ++ ; max ++ ; } else if ( g . getPotSuccOrNeighOf ( i ) . contains ( i ) ) { max ++ ; } } k . updateLowerBound ( min , this ) ; k . updateUpperBound ( max , this ) ; ...
public class DerValue { /** * Returns a Date if the DerValue is GeneralizedTime . * @ return the Date held in this DER value */ public Date getGeneralizedTime ( ) throws IOException { } }
if ( tag != tag_GeneralizedTime ) { throw new IOException ( "DerValue.getGeneralizedTime, not a GeneralizedTime: " + tag ) ; } return buffer . getGeneralizedTime ( data . available ( ) ) ;
public class ResourceRecordSets { /** * creates mx set of { @ link denominator . model . rdata . MXData MX } records for the specified name and * ttl . * @ param name ex . { @ code denominator . io . } * @ param mxdata mxdata values ex . { @ code [ 1 mx1 . denominator . io . , 2 mx2 . denominator . io . ] } */ pu...
return new MXBuilder ( ) . name ( name ) . addAll ( mxdata ) . build ( ) ;
public class XmlParser { /** * 往pojo中指定字段设置值 ( 字段为Collection类型 ) * @ param elements 要设置的数据节点 * @ param attrName 要获取的属性名 , 如果该值不为空则认为数据需要从属性中取而不是从节点数据中取 * @ param pojo pojo * @ param field 字段说明 */ @ SuppressWarnings ( "unchecked" ) private void setValue ( List < Element > elements , String attrName , Object pojo...
XmlNode attrXmlNode = field . getAnnotation ( XmlNode . class ) ; log . debug ( "要赋值的fieldName为{}" , field . getName ( ) ) ; final XmlTypeConvert convert = XmlTypeConverterUtil . resolve ( attrXmlNode , field ) ; Class < ? extends Collection > collectionClass ; Class < ? extends Collection > real = ( Class < ? extends ...
public class GetLoadBalancerTlsCertificatesRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( GetLoadBalancerTlsCertificatesRequest getLoadBalancerTlsCertificatesRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( getLoadBalancerTlsCertificatesRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getLoadBalancerTlsCertificatesRequest . getLoadBalancerName ( ) , LOADBALANCERNAME_BINDING ) ; } catch ( Exception e ) { throw new SdkClientExcepti...
public class MultiFormatParser { /** * / * [ deutsch ] * < p > Erzeugt einen neuen Multiformatinterpretierer . < / p > * @ param < T > generic type of chronological entity * @ param formats list of multiple formats * @ return new immutable instance of MultiFormatParser * @ since 3.14/4.11 */ @ SuppressWarning...
ChronoFormatter < T > [ ] parsers = formats . toArray ( ( ChronoFormatter < T > [ ] ) Array . newInstance ( ChronoFormatter . class , formats . size ( ) ) ) ; return new MultiFormatParser < > ( parsers ) ;
public class FailoverProxy { /** * Check if this Sqlerror is a connection exception . if that ' s the case , must be handle by * failover * < p > error codes : 08000 : connection exception 08001 : SQL client unable to establish SQL * connection 08002 : connection name in use 08003 : connection does not exist 0800...
return exception . getSQLState ( ) != null && ( exception . getSQLState ( ) . startsWith ( "08" ) || ( exception . getSQLState ( ) . equals ( "70100" ) && 1927 == exception . getErrorCode ( ) ) ) ;
public class hqlParser { /** * hql . g : 330:1 : groupByClause : GROUP ^ ' by ' ! expression ( COMMA ! expression ) * ; */ public final hqlParser . groupByClause_return groupByClause ( ) throws RecognitionException { } }
hqlParser . groupByClause_return retval = new hqlParser . groupByClause_return ( ) ; retval . start = input . LT ( 1 ) ; CommonTree root_0 = null ; Token GROUP121 = null ; Token string_literal122 = null ; Token COMMA124 = null ; ParserRuleReturnScope expression123 = null ; ParserRuleReturnScope expression125 = null ; C...
public class CUtil { /** * Parse a string containing directories into an File [ ] * @ param path * path string , for example " . ; c : \ something \ include " * @ param delim * delimiter , typically ; or : */ public static File [ ] parsePath ( final String path , final String delim ) { } }
final Vector libpaths = new Vector ( ) ; int delimPos = 0 ; for ( int startPos = 0 ; startPos < path . length ( ) ; startPos = delimPos + delim . length ( ) ) { delimPos = path . indexOf ( delim , startPos ) ; if ( delimPos < 0 ) { delimPos = path . length ( ) ; } // don ' t add an entry for zero - length paths if ( de...
public class ChangeTrackingMap { /** * Roll back all changes made since construction . This is the same function ad { @ link # revertToTag ( ) } . If the map is not in tag mode ( * this means { @ link # isTagged ( ) } returns < code > true < / code > ) this method will do nothing . */ public final void revert ( ) { }...
if ( tagged ) { // Remove the added entries final Iterator < K > addedIt = added . keySet ( ) . iterator ( ) ; while ( addedIt . hasNext ( ) ) { final K key = addedIt . next ( ) ; map . remove ( key ) ; addedIt . remove ( ) ; } // Replace the changed entries final Iterator < K > changedIt = changed . keySet ( ) . itera...
public class ResolvableType { /** * Return a { @ link ResolvableType } for the specified { @ link Class } with pre - declared generics . * @ param sourceClass the source class * @ param generics the generics of the class * @ return a { @ link ResolvableType } for the specific class and generics * @ see # forCla...
Assert . notNull ( sourceClass , "Source class must not be null" ) ; Assert . notNull ( generics , "Generics must not be null" ) ; TypeVariable < ? > [ ] variables = sourceClass . getTypeParameters ( ) ; Assert . isTrue ( variables . length == generics . length , "Mismatched number of generics specified" ) ; return for...
public class version_matrix_status { /** * < pre > * Converts API response of bulk operation into object and returns the object array in case of get request . * < / pre > */ protected base_resource [ ] get_nitro_bulk_response ( nitro_service service , String response ) throws Exception { } }
version_matrix_status_responses result = ( version_matrix_status_responses ) service . get_payload_formatter ( ) . string_to_resource ( version_matrix_status_responses . class , response ) ; if ( result . errorcode != 0 ) { if ( result . errorcode == SESSION_NOT_EXISTS ) service . clear_session ( ) ; throw new nitro_ex...
public class GraphicalModel { /** * Add a binary factor , where we just want to hard - code the value of the factor . * @ param a The index of the first variable . * @ param cardA The cardinality ( i . e , dimension ) of the first factor * @ param b The index of the second variable * @ param cardB The cardinali...
return addStaticFactor ( new int [ ] { a , b } , new int [ ] { cardA , cardB } , assignment -> value . apply ( assignment [ 0 ] , assignment [ 1 ] ) ) ;
public class FocusManager { /** * Registers the { @ link Focusable } to manage focus for the particular scene object . * The focus manager will not hold strong references to the sceneObject and the focusable . * @ param sceneObject * @ param focusable */ public void register ( final GVRSceneObject sceneObject , f...
Log . d ( Log . SUBSYSTEM . FOCUS , TAG , "register sceneObject %s , focusable = %s" , sceneObject . getName ( ) , focusable ) ; mFocusableMap . put ( sceneObject , new WeakReference < > ( focusable ) ) ;
public class HashedArray { /** * Determines if the given { @ link ArrayView } instances contain the same data . * @ param av1 The first instance . * @ param av2 The second instance . * @ return True if both instances have the same length and contain the same data . */ public static boolean arrayEquals ( ArrayView...
int len = av1 . getLength ( ) ; if ( len != av2 . getLength ( ) ) { return false ; } byte [ ] a1 = av1 . array ( ) ; int o1 = av1 . arrayOffset ( ) ; byte [ ] a2 = av2 . array ( ) ; int o2 = av2 . arrayOffset ( ) ; for ( int i = 0 ; i < len ; i ++ ) { if ( a1 [ o1 + i ] != a2 [ o2 + i ] ) { return false ; } } return tr...
public class AbstractValueConverterToContainer { /** * This method performs the { @ link # convert ( Object , Object , GenericType ) conversion } for { @ link Collection } * values . * @ param < T > is the generic type of { @ code targetType } . * @ param collectionValue is the { @ link Collection } value to conv...
int size = collectionValue . size ( ) ; T container = createContainer ( targetType , size ) ; int i = 0 ; for ( Object element : collectionValue ) { convertContainerEntry ( element , i , container , valueSource , targetType , collectionValue ) ; i ++ ; } return container ;
public class StyleRuntimeException { /** * Throw < code > this < / code > if packed exception is not instanceof among * given classes * @ param classes throw when doesn ' t matches all these classes */ public void throwNotIn ( @ SuppressWarnings ( "unchecked" ) Class < ? extends Throwable > ... classes ) { } }
boolean toThrow = true ; for ( Class < ? extends Throwable > cls : classes ) { if ( cls . isInstance ( super . getCause ( ) ) ) { toThrow = false ; break ; } } if ( toThrow ) { throw this ; }
public class ScopeContext { /** * return the size in bytes of all session contexts * @ return size in bytes * @ throws ExpressionException */ public long getScopesSize ( int scope ) throws ExpressionException { } }
if ( scope == Scope . SCOPE_APPLICATION ) return SizeOf . size ( applicationContexts ) ; if ( scope == Scope . SCOPE_CLUSTER ) return SizeOf . size ( cluster ) ; if ( scope == Scope . SCOPE_SERVER ) return SizeOf . size ( server ) ; if ( scope == Scope . SCOPE_SESSION ) return SizeOf . size ( this . cfSessionContexts )...
public class MSwingUtilities { /** * Redimensionne une image . * @ param img Image * @ param targetWidth int * @ param targetHeight int * @ return Image */ public static Image getScaledInstance ( Image img , int targetWidth , int targetHeight ) { } }
final int type = BufferedImage . TYPE_INT_ARGB ; Image ret = img ; final int width = ret . getWidth ( null ) ; final int height = ret . getHeight ( null ) ; if ( width != targetWidth && height != targetHeight ) { // a priori plus performant que Image . getScaledInstance final BufferedImage scratchImage = new BufferedIm...
public class OGNL { /** * 检查 paremeter 对象中指定的 fields 是否全是 null , 如果是则抛出异常 * @ param parameter * @ param fields * @ return */ public static boolean notAllNullParameterCheck ( Object parameter , String fields ) { } }
if ( parameter != null ) { try { Set < EntityColumn > columns = EntityHelper . getColumns ( parameter . getClass ( ) ) ; Set < String > fieldSet = new HashSet < String > ( Arrays . asList ( fields . split ( "," ) ) ) ; for ( EntityColumn column : columns ) { if ( fieldSet . contains ( column . getProperty ( ) ) ) { Obj...
public class SAXRecords { /** * Get the SAX string of this whole collection . * @ param separatorToken The separator token to use for the string . * @ return The whole data as a string . */ public String getSAXString ( String separatorToken ) { } }
StringBuffer sb = new StringBuffer ( ) ; ArrayList < Integer > index = new ArrayList < Integer > ( ) ; index . addAll ( this . realTSindex . keySet ( ) ) ; Collections . sort ( index , new Comparator < Integer > ( ) { public int compare ( Integer int1 , Integer int2 ) { return int1 . compareTo ( int2 ) ; } } ) ; for ( ...
public class DialCodeManager { /** * Get the dial code for the specified country ( in the ISO - 3166 two letter * type ) . * @ param sCountry * The country code . Must be 2 characters long . * @ return < code > null < / code > if no mapping exists . */ @ Nullable public static String getDialCodeOfCountry ( @ Nu...
if ( StringHelper . hasNoText ( sCountry ) ) return null ; return s_aCountryToDialCode . get ( sCountry . toUpperCase ( Locale . US ) ) ;
public class MethodCompiler { /** * Create new array * < p > Stack : . . . , = & gt ; . . . , arrayref * @ param type array class eg . String [ ] . class * @ param count array count * @ throws IOException */ public void newarray ( TypeMirror type , int count ) throws IOException { } }
if ( type . getKind ( ) != TypeKind . ARRAY ) { throw new IllegalArgumentException ( type + " is not array" ) ; } ArrayType at = ( ArrayType ) type ; iconst ( count ) ; TypeMirror ct = at . getComponentType ( ) ; switch ( ct . getKind ( ) ) { case BOOLEAN : newarray ( T_BOOLEAN ) ; break ; case CHAR : newarray ( T_CHAR...
public class FlexBase64 { /** * Creates an OutputStream wrapper which base64 encodes and writes to the passed OutputStream target . When this * stream is closed base64 padding will be added if needed . Alternatively if this represents an " inner stream " , * the { @ link FlexBase64 . EncoderOutputStream # complete ...
return new EncoderOutputStream ( target , bufferSize , wrap ) ;
public class Capabilities { /** * Use direct Class . forName ( ) to test for the existence of a class . * We should not use BshClassManager here because : * a ) the systems using these tests would probably not load the * classes through it anyway . * b ) bshclassmanager is heavy and touches other class files . ...
if ( ! classes . containsKey ( name ) ) try { /* Note : do * not * change this to BshClassManager plainClassForName ( ) or equivalent . This class must not touch any other bsh classes . */ classes . put ( name , Class . forName ( name ) ) ; } catch ( ClassNotFoundException e ) { classes . put ( name , null ) ; } re...
public class PartitionStateManager { /** * Sets the initial partition table and state version . If any partition has a replica , the partition state manager is * set to initialized , otherwise { @ link # isInitialized ( ) } stays uninitialized but the current state will be updated * nevertheless . * @ param parti...
if ( initialized ) { throw new IllegalStateException ( "Partition table is already initialized!" ) ; } logger . info ( "Setting cluster partition table..." ) ; boolean foundReplica = false ; PartitionReplica localReplica = PartitionReplica . from ( node . getLocalMember ( ) ) ; for ( int partitionId = 0 ; partitionId <...
public class LayoutFactory { /** * Returns the layout matching the current definition of the given type . * @ throws PersistException if type represents a new generation , but * persisting this information failed */ public Layout layoutFor ( Class < ? extends Storable > type ) throws FetchException , PersistExcepti...
return layoutFor ( type , null ) ;
public class AWSIotClient { /** * Creates a 2048 - bit RSA key pair and issues an X . 509 certificate using the issued public key . * < b > Note < / b > This is the only time AWS IoT issues the private key for this certificate , so it is important to keep * it in a secure location . * @ param createKeysAndCertifi...
request = beforeClientExecution ( request ) ; return executeCreateKeysAndCertificate ( request ) ;
public class FFMQAdminClient { /** * / * ( non - Javadoc ) * @ see java . lang . Runnable # run ( ) */ @ Override public void run ( ) { } }
String command = globalSettings . getStringProperty ( FFMQAdminClientSettings . ADM_COMMAND , null ) ; if ( StringTools . isEmpty ( command ) ) { err . println ( "No command specified" ) ; return ; } try { openSession ( ) ; processCommand ( command ) ; } catch ( JMSException e ) { logError ( e ) ; } finally { closeSess...
public class RPSImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public boolean eIsSet ( int featureID ) { } }
switch ( featureID ) { case AfplibPackage . RPS__RLENGTH : return RLENGTH_EDEFAULT == null ? rlength != null : ! RLENGTH_EDEFAULT . equals ( rlength ) ; case AfplibPackage . RPS__RPTDATA : return RPTDATA_EDEFAULT == null ? rptdata != null : ! RPTDATA_EDEFAULT . equals ( rptdata ) ; } return super . eIsSet ( featureID )...
public class ZipUtil { /** * Compresses the given directory and all of its sub - directories into the passed in * stream . It is the responsibility of the caller to close the passed in * stream properly . * @ param sourceDir * root directory . * @ param os * output stream ( will be buffered in this method )...
pack ( sourceDir , os , IdentityNameMapper . INSTANCE , DEFAULT_COMPRESSION_LEVEL ) ;
public class ScopeFactory { /** * cast a int scope definition to a string definition * @ param scope * @ return */ public static String toStringScope ( int scope , String defaultValue ) { } }
switch ( scope ) { case Scope . SCOPE_APPLICATION : return "application" ; case Scope . SCOPE_ARGUMENTS : return "arguments" ; case Scope . SCOPE_CALLER : return "caller" ; case Scope . SCOPE_CGI : return "cgi" ; case Scope . SCOPE_CLIENT : return "client" ; case Scope . SCOPE_COOKIE : return "cookie" ; case Scope . SC...
public class Transmitter { /** * Remove the transmitter from the connection ' s list of allocations . Returns a socket that the * caller should close . */ @ Nullable Socket releaseConnectionNoEvents ( ) { } }
assert ( Thread . holdsLock ( connectionPool ) ) ; int index = - 1 ; for ( int i = 0 , size = this . connection . transmitters . size ( ) ; i < size ; i ++ ) { Reference < Transmitter > reference = this . connection . transmitters . get ( i ) ; if ( reference . get ( ) == this ) { index = i ; break ; } } if ( index == ...
public class Value { /** * < code > . google . type . DayOfWeek day _ of _ week _ value = 8 ; < / code > */ public com . google . type . DayOfWeek getDayOfWeekValue ( ) { } }
if ( typeCase_ == 8 ) { @ SuppressWarnings ( "deprecation" ) com . google . type . DayOfWeek result = com . google . type . DayOfWeek . valueOf ( ( java . lang . Integer ) type_ ) ; return result == null ? com . google . type . DayOfWeek . UNRECOGNIZED : result ; } return com . google . type . DayOfWeek . DAY_OF_WEEK_U...
public class BeanDeployer { /** * Loads a given class , creates a { @ link SlimAnnotatedTypeContext } for it and stores it in { @ link BeanDeployerEnvironment } . */ public BeanDeployer addClass ( String className , AnnotatedTypeLoader loader ) { } }
addIfNotNull ( loader . loadAnnotatedType ( className , getManager ( ) . getId ( ) ) ) ; return this ;
public class Config { /** * Returns an iterator that returns all of the configuration keys in this config object . */ public Iterator < String > keys ( ) { } }
HashSet < String > matches = new HashSet < String > ( ) ; enumerateKeys ( matches ) ; return matches . iterator ( ) ;
public class TolerantSaxDocumentBuilder { /** * Create a DOM Element for insertion into the current document * @ param namespaceURI * @ param qName * @ param attributes * @ return the created Element */ private Element createElement ( String namespaceURI , String qName , Attributes attributes ) { } }
Element newElement = currentDocument . createElement ( qName ) ; if ( namespaceURI != null && namespaceURI . length ( ) > 0 ) { newElement . setPrefix ( namespaceURI ) ; } for ( int i = 0 ; attributes != null && i < attributes . getLength ( ) ; ++ i ) { newElement . setAttribute ( attributes . getQName ( i ) , attribut...
public class UpgradeReadCallback { /** * / * ( non - Javadoc ) * @ see com . ibm . wsspi . tcpchannel . TCPReadCompletedCallback # error ( com . ibm . wsspi . channelfw . VirtualConnection , com . ibm . wsspi . tcpchannel . TCPReadRequestContext , java . io . IOException ) */ @ Override @ FFDCIgnore ( IOException . c...
boolean closing = false ; boolean isFirstRead = false ; synchronized ( _srtUpgradeStream ) { closing = _upgradeStream . isClosing ( ) ; isFirstRead = _upgradeStream . isFirstRead ( ) ; _upgradeStream . setIsInitialRead ( false ) ; } if ( ! closing ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled...
public class SqlAgentFactoryImpl { /** * { @ inheritDoc } * @ see jp . co . future . uroborosql . SqlAgentFactory # setFetchSize ( int ) */ @ Override public SqlAgentFactory setFetchSize ( final int fetchSize ) { } }
getDefaultProps ( ) . put ( PROPS_KEY_FETCH_SIZE , String . valueOf ( fetchSize ) ) ; return this ;
public class PageBlobInputStream { /** * Reads a byte . */ @ Override public int read ( ) throws IOException { } }
if ( _data == null ) { _data = new byte [ 1 ] ; } int result = _pageReader . read ( _offset , _data , 0 , 1 ) ; if ( result > 0 ) { _offset ++ ; return _data [ 0 ] & 0xff ; } else { return - 1 ; }
public class AbstractHibernateCriteriaBuilder { /** * Applys a " in " contrain on the specified property * @ param propertyName The property name * @ param values A collection of values * @ return A Criterion instance */ @ SuppressWarnings ( "rawtypes" ) public org . grails . datastore . mapping . query . api . C...
if ( ! validateSimpleExpression ( ) ) { throwRuntimeException ( new IllegalArgumentException ( "Call to [in] with propertyName [" + propertyName + "] and values [" + values + "] not allowed here." ) ) ; } propertyName = calculatePropertyName ( propertyName ) ; if ( values instanceof List ) { values = convertArgumentLis...
public class ClassSourceImpl_MappedJar { /** * < p > Open the ClassSource for processing . If this is the first open , the underlying jar * file will be opened . < / p > * @ throws ClassSource _ Exception Thrown if the open failed . */ @ Override @ Trivial public void open ( ) throws ClassSource_Exception { } }
String methodName = "open" ; if ( tc . isEntryEnabled ( ) ) { String msg = MessageFormat . format ( "[ {0} ] State [ {1} ]" , new Object [ ] { getHashText ( ) , Integer . valueOf ( opens ) } ) ; Tr . entry ( tc , methodName , msg ) ; } if ( ( opens < 0 ) || ( ( opens == 0 ) && ( jarFile != null ) ) || ( ( opens > 0 ) &...
public class PasswordManager { /** * Decrypt a password if it is an encrypted password ( in the form of ENC ( . * ) ) * and a master password file has been provided in the constructor . * Otherwise , return the password as is . */ public String readPassword ( String password ) { } }
if ( password == null || encryptors . size ( ) < 1 ) { return password ; } Matcher matcher = PASSWORD_PATTERN . matcher ( password ) ; if ( matcher . find ( ) ) { return this . decryptPassword ( matcher . group ( 1 ) ) ; } return password ;
public class JsonUtils { /** * Method serialises < code > HppResponse < / code > to JSON . * @ param hppResponse * @ return String */ public static String toJson ( HppResponse hppResponse ) { } }
try { return hppResponseWriter . writeValueAsString ( hppResponse ) ; } catch ( JsonProcessingException ex ) { LOGGER . error ( "Error writing HppResponse to JSON." , ex ) ; throw new RealexException ( "Error writing HppResponse to JSON." , ex ) ; }
public class Id { /** * Compares another Id to this id . Two ids are only comparable if they have the exact same type : if their types are * incompatible then a ClassCastException will be thrown < br / > * If the types are comparable then the result is a case - sensitive comparison of the underlying id valued * @...
if ( ! that . getClass ( ) . equals ( this . getClass ( ) ) ) { throw new ClassCastException ( "Incomparable Id types: " + that . getClass ( ) + " being compared to " + this . getClass ( ) ) ; } else { return this . id . compareTo ( that . id ) ; }
public class ModelResourceStructure { /** * < p > fetchHistory . < / p > * @ param id a URI _ ID object . * @ return a { @ link javax . ws . rs . core . Response } object . * @ throws java . lang . Exception if any . */ public Response fetchHistory ( @ PathParam ( "id" ) URI_ID id ) throws Exception { } }
final MODEL_ID mId = tryConvertId ( id ) ; matchedFetchHistory ( mId ) ; final Query < MODEL > query = server . find ( modelType ) ; defaultFindOrderBy ( query ) ; final Ref < FutureRowCount > rowCount = Refs . emptyRef ( ) ; Object entity = executeTx ( t -> { configDefaultQuery ( query ) ; configFetchHistoryQuery ( qu...
public class N { /** * Reverses the order of the given array in the given range . * @ param a * @ param fromIndex * @ param toIndex */ public static void reverse ( final char [ ] a , int fromIndex , int toIndex ) { } }
checkFromToIndex ( fromIndex , toIndex , len ( a ) ) ; if ( N . isNullOrEmpty ( a ) || a . length == 1 ) { return ; } char tmp = 0 ; for ( int i = fromIndex , j = toIndex - 1 ; i < j ; i ++ , j -- ) { tmp = a [ i ] ; a [ i ] = a [ j ] ; a [ j ] = tmp ; }
public class DecimalFormatSymbols { /** * Initializes the symbols from the FormatData resource bundle . */ private void initialize ( Locale locale ) { } }
this . locale = locale ; // Android - changed : Removed use of DecimalFormatSymbolsProvider . Switched to ICU . // get resource bundle data - try the cache first boolean needCacheUpdate = false ; Object [ ] data = cachedLocaleData . get ( locale ) ; if ( data == null ) { /* cache miss */ locale = LocaleData . mapInvali...
public class Person { /** * Gets the value of the manager property . * This accessor method returns a reference to the live list , * not a snapshot . Therefore any modification you make to the * returned list will be present inside the JAXB object . * This is why there is not a < CODE > set < / CODE > method fo...
if ( manager == null ) { manager = new ArrayList < com . ibm . wsspi . security . wim . model . IdentifierType > ( ) ; } return this . manager ;
public class Cob2CobolTypesGenerator { /** * Given a COBOL copybook , produce a set of java classes ( source code ) used * to convert mainframe data ( matching the copybook ) at runtime . * @ param cobolSource the COBOL copybook source * @ param targetPackageName the java package the generated classes should * ...
return generate ( new StringReader ( cobolSource ) , targetPackageName , xsltFileName ) ;
public class MultipleWordsWordRule { /** * @ see IRule # evaluate ( ICharacterScanner ) */ public IToken evaluate ( ICharacterScanner scanner ) { } }
offset = 0 ; int c = read ( scanner ) ; if ( c != ICharacterScanner . EOF && fDetector . isWordStart ( ( char ) c ) ) { if ( fColumn == UNDEFINED || fColumn == scanner . getColumn ( ) - 1 ) { fBuffer . setLength ( 0 ) ; fBuffer . append ( ( char ) c ) ; for ( int i = 0 ; i < getMaxPartCount ( ) ; i ++ ) { // read a wor...
public class AwtExtensions { /** * Gets the root JDialog from the given Component Object . * @ param component * The Component to find the root JDialog . * @ return ' s the root JDialog . */ public static Component getRootJDialog ( Component component ) { } }
while ( null != component . getParent ( ) ) { component = component . getParent ( ) ; if ( component instanceof JDialog ) { break ; } } return component ;
public class AbstractDocumentationMojo { /** * Create a parser for the given file . * @ param inputFile the file to be parsed . * @ return the parser . * @ throws MojoExecutionException if the parser cannot be created . * @ throws IOException if a classpath entry cannot be found . */ @ SuppressWarnings ( "check...
final AbstractMarkerLanguageParser parser ; if ( isFileExtension ( inputFile , MarkdownParser . MARKDOWN_FILE_EXTENSIONS ) ) { parser = this . injector . getInstance ( MarkdownParser . class ) ; } else { throw new MojoExecutionException ( MessageFormat . format ( Messages . AbstractDocumentationMojo_3 , inputFile ) ) ;...
public class ColorImg { /** * Clamps all values of all channels ( including alpha if present ) to unit range [ 0,1 ] . * Values less than 0 are set to zero , values greater than 1 are set to 1. * @ return this for chaining * @ see # clampChannelToUnitRange ( int ) */ public ColorImg clampAllChannelsToUnitRange ( ...
clampChannelToUnitRange ( channel_r ) ; clampChannelToUnitRange ( channel_g ) ; clampChannelToUnitRange ( channel_b ) ; if ( hasAlpha ) clampChannelToUnitRange ( channel_a ) ; return this ;
public class FileManager { /** * Creates a default File in case it does not exist yet . Default files can be used to load other files that are * created at runtime ( like properties file ) * @ param defaultFilePath path to default file . txt ( or where it should be created ) * @ param initMessage the string to wr...
File file = new File ( defaultFilePath ) ; BufferedWriter bufferedWriterInit = null ; try { if ( ! file . exists ( ) ) { file . createNewFile ( ) ; bufferedWriterInit = new BufferedWriter ( new FileWriter ( defaultFilePath ) ) ; bufferedWriterInit . write ( initMessage ) ; } } catch ( IOException e ) { error ( "unable ...