关闭

关闭

封号提示

内容

首页 [Java.Cookbook(2nd,2004.6)].Ian.F.Darwin.文字版.pdf

[Java.Cookbook(2nd,2004.6)].Ian.F.Darwin.文字版.pdf

[Java.Cookbook(2nd,2004.6)].Ian…

上传者: 二二二二二二二2 2014-02-22 评分1 评论0 下载1 收藏0 阅读量878 暂无简介 简介 举报

简介:本文档为《[Java.Cookbook(2nd,2004.6)].Ian.F.Darwin.文字版pdf》,可适用于IT/计算机领域,主题内容包含JavaCookbookOtherJavaresourcesfromO’ReillyRelatedtitlesJavainaNutshellHead符等。

JavaCookbookOtherJavaresourcesfromO’ReillyRelatedtitlesJavainaNutshellHeadFirstJavaHeadFirstEJBProgrammingJakartaStrutsTomcat:TheDefinitiveGuideLearningJavaBetter,Faster,LighterJavaJavaServletandJSPCookbookHardcoreJavaJavaServerPagesJavaBooksResourceCenterjavaoreillycomisacompletecatalogofO’Reilly’sbooksonJavaandrelatedtechnologies,includingsamplechaptersandcodeexamplesOnJavacomisaonestopresourceforenterpriseJavadevelopers,featuringnews,coderecipes,interviews,weblogs,andmoreConferencesO’ReillybringsdiverseinnovatorstogethertonurturetheideasthatsparkrevolutionaryindustriesWespecializeindocumentingthelatesttoolsandsystems,translatingtheinnovator’sknowledgeintousefulskillsforthoseinthetrenchesVisitconferencesoreillycomforourupcomingeventsSafariBookshelf(safarioreillycom)isthepremieronlinereferencelibraryforprogrammersandITprofessionalsConductsearchesacrossmorethan,booksSubscriberscanzeroinonanswerstotimecriticalquestionsinamatterofsecondsReadthebooksonyourBookshelffromcovertocoverorsimplyfliptothepageyouneedTryittodaywithafreetrialJavaCookbookSECONDEDITIONIanFDarwinBeijing•Cambridge•Farnham•Köln•Paris•Sebastopol•Taipei•TokyoJavaCookbook,SecondEditionbyIanFDarwinCopyright,O’ReillyMedia,IncAllrightsreservedPrintedintheUnitedStatesofAmericaPublishedbyO’ReillyMedia,Inc,GravensteinHighwayNorth,Sebastopol,CAO’Reillybooksmaybepurchasedforeducational,business,orsalespromotionaluseOnlineeditionsarealsoavailableformosttitles(safarioreillycom)Formoreinformation,contactourcorporateinstitutionalsalesdepartment:()orcorporateoreillycomEditors:MikeLoukidesandDebraCameronProductionEditor:MarloweShaefferCoverDesigner:HannaDyerInteriorDesigner:DavidFutatoPrintingHistory:June:FirstEditionJune:SecondEditionNutshellHandbook,theNutshellHandbooklogo,andtheO’ReillylogoareregisteredtrademarksofO’ReillyMedia,IncTheCookbookseriesdesignations,JavaCookbook,theimageofadomesticchicken,andrelatedtradedressaretrademarksofO’ReillyMedia,IncJavaandallJavabasedtrademarksandlogosaretrademarksorregisteredtrademarksofSunMicrosystems,Inc,intheUnitedStatesandothercountriesO’ReillyMedia,IncisindependentofSunMicrosystems,IncManyofthedesignationsusedbymanufacturersandsellerstodistinguishtheirproductsareclaimedastrademarksWherethosedesignationsappearinthisbook,andO’ReillyMedia,Incwasawareofatrademarkclaim,thedesignationshavebeenprintedincapsorinitialcapsWhileeveryprecautionhasbeentakeninthepreparationofthisbook,thepublisherandauthorassumenoresponsibilityforerrorsoromissions,orfordamagesresultingfromtheuseoftheinformationcontainedhereinThisbookusesRepKover,adurableandflexiblelayflatbindingISBN:ISBN:MvTableofContentsPrefacexvGettingStarted:Compiling,Running,andDebuggingCompilingandRunningJava:JDKEditingandCompilingwithaColorHighlightingEditorCompiling,Running,andTestingwithanIDEUsingCLASSPATHEffectivelyUsingthecomdarwinsysAPIClassesfromThisBookCompilingtheSourceCodeExamplesfromThisBookAutomatingCompilationwithAntRunningAppletsDealingwithDeprecationWarningsConditionalDebuggingWithout#ifdefDebuggingPrintoutsMaintainingProgramCorrectnesswithAssertionsDebuggingwithJDBUnitTesting:AvoidtheNeedforDebuggersGettingReadableTracebacksFindingMoreJavaSourceCodeProgram:DebugInteractingwiththeEnvironmentGettingEnvironmentVariablesSystemPropertiesWritingJDKReleaseDependentCodeWritingOperatingSystemDependentCodeUsingExtensionsorOtherPackagedAPIsParsingCommandLineArgumentsvi|TableofContentsStringsandThingsTakingStringsApartwithSubstringsTakingStringsApartwithStringTokenizerPuttingStringsTogetherwith,StringBuilder(JDK),andStringBufferProcessingaStringOneCharacterataTimeAligningStringsConvertingBetweenUnicodeCharactersandStringsReversingaStringbyWordorbyCharacterExpandingandCompressingTabsControllingCaseIndentingTextDocumentsEnteringNonprintableCharactersTrimmingBlanksfromtheEndofaStringParsingCommaSeparatedDataProgram:ASimpleTextFormatterProgram:SoundexNameComparisonsPatternMatchingwithRegularExpressionsRegularExpressionSyntaxUsingregexesinJava:TestforaPatternFindingtheMatchingTextReplacingtheMatchedTextPrintingAllOccurrencesofaPatternPrintingLinesContainingaPatternControllingCaseinRegularExpressionsMatching“Accented”orCompositeCharactersMatchingNewlinesinTextProgram:ApacheLogfileParsingProgram:DataMiningProgram:FullGrepNumbersCheckingWhetheraStringIsaValidNumberStoringaLargerNumberinaSmallerNumberConvertingNumberstoObjectsandViceVersaTakingaFractionofanIntegerWithoutUsingFloatingPointEnsuringtheAccuracyofFloatingPointNumbersComparingFloatingPointNumbersTableofContents|viiRoundingFloatingPointNumbersFormattingNumbersConvertingBetweenBinary,Octal,Decimal,andHexadecimalOperatingonaSeriesofIntegersWorkingwithRomanNumeralsFormattingwithCorrectPluralsGeneratingRandomNumbersGeneratingBetterRandomNumbersCalculatingTrigonometricFunctionsTakingLogarithmsMultiplyingMatricesUsingComplexNumbersHandlingVeryLargeNumbersProgram:TempConverterProgram:NumberPalindromesDatesandTimesFindingToday’sDatePrintingDateTimeinaGivenFormatRepresentingDatesinOtherEpochsConvertingYMDHMStoaCalendarorEpochSecondsParsingStringsintoDatesConvertingEpochSecondstoDMYHMSAddingtoorSubtractingfromaDateorCalendarDifferenceBetweenTwoDatesComparingDatesDayofWeekMonthYearorWeekNumberCreatingaCalendarPageMeasuringElapsedTimeSleepingforaWhileProgram:ReminderServiceStructuringDatawithJavaUsingArraysforDataStructuringResizinganArrayLikeanArray,butMoreDynamicUsingIteratorsforDataIndependentAccessStructuringDatainaLinkedListMappingwithHashtableandHashMapviii|TableofContentsStoringStringsinPropertiesandPreferencesSortingaCollectionAvoidingtheUrgetoSortEschewingDuplicationFindinganObjectinaCollectionConvertingaCollectiontoanArrayRollingYourOwnIteratorStackMultidimensionalStructuresFinally,CollectionsProgram:TimingComparisonsDataStructuringwithGenerics,foreach,andEnumerations(JDK)UsingGenericCollectionsUsing“foreach”LoopsAvoidCastingbyUsingGenericsLetJavaConvertwithAutoBoxingandAutoUnboxingUsingTypesafeEnumerationsProgram:MediaInvoicerObjectOrientedTechniquesPrintingObjects:FormattingwithtoString()OverridingtheEqualsMethodOverridingthehashCodeMethodTheCloneMethodTheFinalizeMethodUsingInnerClassesProvidingCallbacksviaInterfacesPolymorphismAbstractMethodsPassingValuesEnforcingtheSingletonPatternRollYourOwnExceptionsProgram:PlotterInputandOutputReadingStandardInputWritingStandardOutputPrintingwiththeFormatterScanningaFilewithStreamTokenizerScanningInputwiththeScannerClassTableofContents|ixOpeningaFilebyNameCopyingaFileReadingaFileintoaStringReassigningtheStandardStreamsDuplicatingaStreamasItIsWrittenReadingWritingaDifferentCharacterSetThosePeskyEndofLineCharactersBewarePlatformDependentFileCodeReading“Continued”LinesBinaryDataSeekingWritingDataStreamsfromCSavingandRestoringJavaObjectsPreventingClassCastExceptionswithSerialVersionUIDReadingandWritingJARorZipArchivesReadingandWritingCompressedFilesProgram:TexttoPostScriptDirectoryandFilesystemOperationsGettingFileInformationCreatingaFileRenamingaFileDeletingaFileCreatingaTransientFileChangingFileAttributesListingaDirectoryGettingtheDirectoryRootsCreatingNewDirectoriesProgram:FindProgrammingExternalDevices:SerialandParallelPortsChoosingaPortOpeningaSerialPortOpeningaParallelPortResolvingPortConflictsReadingandWriting:LockStepReadingandWriting:EventDrivenReadingandWriting:ThreadsProgram:PenmanPlotterx|TableofContentsGraphicsandSoundPaintingwithaGraphicsObjectTestingGraphicalComponentsDrawingTextDrawingCenteredTextinaComponentDrawingaDropShadowDrawingTextwithDDrawingTextwithanApplicationFontDrawinganImagePlayingaSoundFilePlayingaVideoClipPrintinginJavaProgram:PlotterAWTProgram:GrapherGraphicalUserInterfacesDisplayingGUIComponentsDesigningaWindowLayoutATabbedViewofLifeActionHandling:MakingButtonsWorkActionHandlingUsingAnonymousInnerClassesTerminatingaProgramwith“WindowClose”Dialogs:WhenLaterJustWon’tDoCatchingandFormattingGUIExceptionsGettingProgramOutputintoaWindowChoosingaValuewithJSpinnerChoosingaFilewithJFileChooserChoosingaColorFormattingJComponentswithHTMLCenteringaMainWindowChangingaSwingProgram’sLookandFeelEnhancingYourGUIforMacOSXProgram:CustomFontChooserProgram:CustomLayoutManagerInternationalizationandLocalizationCreatingaButtonwithINResourcesListingAvailableLocalesCreatingaMenuwithINResourcesTableofContents|xiWritingInternationalizationConvenienceRoutinesCreatingaDialogwithINResourcesCreatingaResourceBundleExtractingStringsfromYourCodeUsingaParticularLocaleSettingtheDefaultLocaleFormattingMessagesProgram:MenuIntlProgram:BusCardNetworkClientsContactingaServerFindingandReportingNetworkAddressesHandlingNetworkErrorsReadingandWritingTextualDataReadingandWritingBinaryDataReadingandWritingSerializedDataUDPDatagramsProgram:TFTPUDPClientProgram:TelnetClientProgram:ChatClientServerSideJava:SocketsOpeningaServerforBusinessReturningaResponse(StringorBinary)ReturningObjectInformationHandlingMultipleClientsServingtheHTTPProtocolSecuringaWebServerwithSSLandJSSENetworkLoggingNetworkLoggingwithlogjNetworkLoggingwithJDKFindingNetworkInterfacesProgram:AJavaChatServerNetworkClientsII:AppletsandWebClientsEmbeddingJavainaWebPageAppletTechniquesContactingaServerontheAppletHostxii|TableofContentsMakinganAppletShowaDocumentMakinganAppletRunJavaScriptMakinganAppletRunaCGIScriptReadingtheContentsofaURLURI,URL,orURNExtractingHTMLfromaURLExtractingURLsfromaFileConvertingaFilenametoaURLProgram:MkIndexProgram:LinkCheckerJavaandElectronicMailSendingEmail:BrowserVersionSendingEmail:ForRealMailEnablingaServerProgramSendingMIMEMailProvidingMailSettingsSendingMailWithoutUsingJavaMailReadingEmailProgram:MailReaderBeanProgram:MailClientDatabaseAccessEasyDatabaseAccesswithJDOTextFileDatabasesDBMDatabasesJDBCSetupandConnectionConnectingtoaJDBCDatabaseSendingaJDBCQueryandGettingResultsUsingJDBCPreparedStatementsUsingStoredProcedureswithJDBCChangingDataUsingaResultSetStoringResultsinaRowSetChangingDataUsingSQLFindingJDBCMetadataProgram:SQLRunnerXMLGeneratingXMLfromObjectsTransformingXMLwithXSLTTableofContents|xiiiParsingXMLwithSAXParsingXMLwithDOMVerifyingStructurewithaDTDGeneratingYourOwnXMLwithDOMProgram:xmlmifDistributedJava:RMIDefiningtheRMIContractCreatinganRMIClientCreatinganRMIServerDeployingRMIAcrossaNetworkProgram:RMICallbacksProgram:NetWatchPackagesandPackagingCreatingaPackageDocumentingClasseswithJavadocBeyondJavaDoc:AnnotationsMetadata(JDK)andXDocletArchivingwithjarRunninganAppletfromaJARRunninganAppletwithaModernJDKRunningaMainProgramfromaJARPreparingaClassasaJavaBeanPicklingYourBeanintoaJARPackagingaServletintoaWARFile“WriteOnce,InstallAnywhere”“WriteOnce,InstallonMacOSX”JavaWebStartSigningYourJARFileThreadedJavaRunningCodeinaDifferentThreadDisplayingaMovingImagewithAnimationStoppingaThreadRendezvousandTimeoutsSynchronizingThreadswiththesynchronizedKeywordSimplifyingSynchronizationwithLocksSynchronizingThreadswithwait()andnotifyAll()SimplifyingProducerConsumerwiththeQueueInterfacexiv|TableofContentsBackgroundSavinginanEditorProgram:ThreadedNetworkServerSimplifyingServersUsingtheConcurrencyUtilities(JDK)Introspection,or“AClassNamedClass”GettingaClassDescriptorFindingandUsingMethodsandFieldsLoadingandInstantiatingaClassDynamicallyConstructingaClassfromScratchPerformanceTimingPrintingClassInformationProgram:CrossRefProgram:AppletViewerUsingJavawithOtherLanguagesRunningaProgramRunningaProgramandCapturingItsOutputMixingJavaandScriptswithBSFMarryingJavaandPerlBlendinginNativeCode(CC)CallingJavafromNativeCodeProgram:DBMAfterwordIndexThisistheTitleoftheBook,eMatterEditionCopyrightO’ReillyAssociates,IncAllrightsreservedxvPrefacePrefacetotheSecondEditionJDK,codenamedTiger,isanexcitingchangetotheJavalandscapeItintroducesseveralmajornewfacilities,suchasgenerictypesforbetterdatastructuring,metadataforannotatingJavaclassesinaflexiblebutwelldefinedmanner,newpatternbasedmechanismsforreadingdata,andanewmechanismforformattedprintingInaddition,amuchlargernumberofsmallerbutimportantchangesadduptoanewreleasethatisamustforJavadevelopersItwillbequitesometimebeforethesemechanismsarefullyunderstoodandinwidecirculation,butyouwillwanttoknowaboutthemrightawayIwroteintheAfterwordtothefirsteditionthat“writingthisbookhasbeenahumblingexperience”Ishouldaddthatmaintainingithasbeenhumbling,tooWhilemanyreviewersandwritershave

类似资料

编辑推荐

影响光合作用的因素.doc

历代书法论文选续编(上海书画出版社)..pdf

中学数学奥林匹克竞赛辅导.pdf

[众妙之门-中国美感心态的深层结构].潘知常.扫描版.pdf

现代电动汽车技术1.pdf

职业精品

精彩专题

加快生态文明体制改革,建设美丽中国

人类的发展与自然环境的保护密切相关,而生态文明建设就是把人类的可持续发展提升到绿色的高度。作为中国特色社会主义的重要内容,生态文明建设关乎到人类的未来。加快生态文明体制改革,事关中华民族伟大复兴中国梦的实现。

用户评论

0/200
    暂无评论
上传我的资料

精选资料

热门资料排行换一换

  • [日]藤泽秀行着_定式的思考.p…

  • [日]藤泽秀行着_考虑平衡.pdf

  • [日]石田芳夫着_业余棋士必知集…

  • 数学科普读物:数学中的运动哲学—…

  • Buddhism in Amer…

  • 象数与中医学.pdf

  • 黎明前的大决战.pdf

  • 奇功异术 中国秘功法四十三种.p…

  • 抗战时期重庆的科学技术.pdf

  • 资料评价:

    / 864
    所需积分:1 立即下载

    意见
    反馈

    返回
    顶部