protected static InternetAddress [ ] add ( InternetAddress [ ] oldArr , InternetAddress newValue ) { if ( oldArr == null ) return new InternetAddress [ ] { newValue } ; // else { InternetAddress [ ] tmp = new InternetAddress [ oldArr . length + 1 ] ; for ( int i = 0 ; i < oldArr . length ; i ++ ) { tmp [ i ] = oldArr [ i ] ; } tmp [ oldArr . length ] = newValue ; return tmp ; // } }
creates a new expanded array and return it ;