JavainaNutshell,5thEdition
ByDavidFlanagan
Publisher :O'Reilly
PubDate :March2002
Tableof
ISBN :0-596-00773-6
•
Contents
Pages :992
• Index
• Reviews
• Examples The1.4releaseofJava2Standardeditionbringsaloadofnew
Reader features-andthepotentialforfrustration.Fretnot,ournew4th
editionhasanswers.Theacceleratedintroductionletsyoustart
•
Reviews writingcoderightaway,andbecausethebook'sclassicquick
referencecontainsalltheclassesintheessentialJavapackages,
• Errata
youcanfindexactlywhatyouneedtomakeJava'snewversion
• Academic workforyou.
JavainaNutshell,5thEdition
ByDavidFlanagan
Tableof
•
Contents Publisher :O'Reilly
• Index
PubDate :March2002
• Reviews
ISBN :0-596-00773-6
• Examples
Pages :992
Reader
•
Reviews
• Errata
• Academic
Dedication
Copyright
Preface
ChangesintheFifthEdition
ContentsofThisBook
RelatedBooks
ExamplesOnline
ConventionsUsedinThisBook
RequestforComments
HowtheQuickReferenceIsGenerated
Acknowledgments
PartI:IntroducingJava
Chapter1.Introduction
Section1.1.WhatIsJava?
Section1.2.KeyBenefitsofJava
Section1.3.AnExampleProgram
Chapter2.JavaSyntaxfromtheGroundUp
Section2.1.JavaProgramsfromtheTopDown
Section2.2.LexicalStructure
Section2.3.PrimitiveDataTypes
Section2.4.ExpressionsandOperators
Section2.5.Statements
Section2.6.Methods
Section2.7.ClassesandObjectsIntroduced
Section2.8.Arrays
Section2.9.ReferenceTypes
Section2.10.PackagesandtheJavaNamespace
Section2.11.JavaFileStructure
Section2.12.DefiningandRunningJavaPrograms
Section2.13.DifferencesBetweenCandJava
Chapter3.Object-OrientedProgramminginJava
Section3.1.ClassDefinitionSyntax
Section3.2.FieldsandMethods
Section3.3.CreatingandInitializingObjects
Section3.4.DestroyingandFinalizingObjects
Section3.5.SubclassesandInheritance
Section3.6.DataHidingandEncapsulation
Section3.7.AbstractClassesandMethods
Section3.8.ImportantMethodsofjava.lang.Object
Section3.9.Interfaces
Section3.10.NestedTypes
Section3.11.ModifierSummary
Section3.12.C++FeaturesNotFoundinJava
Chapter4.Java5.0LanguageFeatures
Section4.1.GenericTypes
Section4.2.EnumeratedTypes
Section4.3.Annotations
Chapter5.TheJavaPlatform
Section5.1.JavaPlatformOverview
Section5.2.Text
Section5.3.NumbersandMath
Section5.4.DatesandTimes
Section5.5.Arrays
Section5.6.Collections
Section5.7.ThreadsandConcurrency
Section5.8.FilesandDirectories
Section5.9.Input/Outputwithjava.io
Section5.10.Networkingwithjava.net
Section5.11.I/OandNetworkingwithjava.nio
Section5.12.XML
Section5.13.Types,Reflection,andDynamicLoading
Section5.14.ObjectPersistence
Section5.15.Security
Section5.16.Cryptography
Section5.17.MiscellaneousPlatformFeatures
Chapter6.JavaSecurity
Section6.1.SecurityRisks
Section6.2.JavaVMSecurityandClassFileVerification
Section6.3.AuthenticationandCryptography
Section6.4.AccessControl
Section6.5.SecurityforEveryone
Section6.6.PermissionClasses
Chapter7.ProgrammingandDocumentationConventions
Section7.1.NamingandCapitalizationConventions
Section7.2.PortabilityConventionsandPureJavaRules
Section7.3.JavaDocumentationComments
Section7.4.JavaBeansConventions
Chapter8.JavaDevelopmentTools
apt
extcheck
jarsigner
jar
java
javac
javadoc
javah
javap
javaws
jconsole
jdb
jinfo
jmap
jps
jsadebugd
jstack
jstat
jstatd
keytool
native2ascii
pack200
policytool
serialver
unpack200
PartII:APIQuickReference
Chapter9.java.io
Packagejava.io
BufferedInputStream
BufferedOutputStream
BufferedReader
BufferedWriter
ByteArrayInputStream
ByteArrayOutputStream
CharArrayReader
CharArrayWriter
CharConversionException
Closeable
DataInput
DataInputStream
DataOutput
DataOutputStream
EOFException
Externalizable
File
FileDescriptor
FileFilter
FileInputStream
FilenameFilter
FileNotFoundException
FileOutputStream
FilePermission
FileReader
FileWriter
FilterInputStream
FilterOutputStream
FilterReader
FilterWriter
Flushable
InputStream
InputStreamReader
InterruptedIOException
InvalidClassException
InvalidObjectException
IOException
LineNumberInputStream
LineNumberReader
NotActiveException
NotSerializableException
ObjectInput
ObjectInputStream
ObjectInputStream.GetField
ObjectInputValidation
ObjectOutput
ObjectOutputStream
ObjectOutputStream.PutField
ObjectStreamClass
ObjectStreamConstants
ObjectStreamException
ObjectStreamField
OptionalDataException
OutputStream
OutputStreamWriter
PipedInputStream
PipedOutputStream
PipedReader
PipedWriter
PrintStream
PrintWriter
PushbackInputStream
PushbackReader
RandomAccessFile
Reader
SequenceInputStream
Serializable
SerializablePermission
StreamCorruptedException
StreamTokenizer
StringBufferInputStream
StringReader
StringWriter
SyncFailedException
UnsupportedEncodingException
UTFDataFormatException
WriteAbortedException
Writer
Chapter10.java.langandSubpackages
Packagejava.lang
AbstractMethodError
AbstractStringBuilder
Appendable
ArithmeticException
ArrayIndexOutOfBoundsException
ArrayStoreException
AssertionError
Boolean
Byte
Character
Character.Subset
Character.UnicodeBlock
CharSequence
Class<T>
ClassCastException
ClassCircularityError
ClassFormatError
ClassLoader
ClassNotFoundException
Cloneable
CloneNotSupportedException
Comparable<T>
Compiler
Deprecated
Double
Enum
EnumConstantNotPresentException
Error
Exception
ExceptionInInitializerError
Float
IllegalAccessError
IllegalAccessException
IllegalArgumentException
IllegalMonitorStateException
IllegalStateException
IllegalThreadStateException
IncompatibleClassChangeError
IndexOutOfBoundsException
InheritableThreadLocal<T>
InstantiationError
InstantiationException
Integer
InternalError
InterruptedException
Iterable<T>
LinkageError
Long
Math
NegativeArraySizeException
NoClassDefFoundError
NoSuchFieldError
NoSuchFieldException
NoSuchMethodError
NoSuchMethodException
NullPointerException
Number
NumberFormatException
Object
OutOfMemoryError
Override
Package
Process
ProcessBuilder
Readable
Runnable
Runtime
RuntimeException
RuntimePermission
SecurityException
SecurityManager
Short
StackOverflowError
StackTraceElement
StrictMath
String
StringBuffer
StringBuilder
StringIndexOutOfBoundsException
SuppressWarnings
System
Thread
Thread.State
Thread.UncaughtExceptionHandler
ThreadDeath
ThreadGroup
ThreadLocal<T>
Throwable
TypeNotPresentException
UnknownError
UnsatisfiedLinkError
UnsupportedClassVersionError
UnsupportedOperationException
VerifyError
VirtualMachineError
Void
Packagejava.lang.annotation
Annotation
AnnotationFormatError
AnnotationTypeMismatchException
Documented
ElementType
IncompleteAnnotationException
Inherited
Retention
RetentionPolicy
Target
Packagejava.lang.instrument
ClassDefinition
ClassFileTransformer
IllegalClassFormatException
Instrumentation
UnmodifiableClassException
Packagejava.lang.management
ClassLoadingMXBean
CompilationMXBean
GarbageCollectorMXBean
ManagementFactory
ManagementPermission
MemoryManagerMXBean
MemoryMXBean
MemoryNotificationInfo
MemoryPoolMXBean
MemoryType
MemoryUsage
OperatingSystemMXBean
RuntimeMXBean
ThreadInfo
ThreadMXBean
Packagejava.lang.ref
PhantomReference<T>
Reference<T>
ReferenceQueue<T>
SoftReference<T>
WeakReference<T>
Packagejava.lang.reflect
AccessibleObject
AnnotatedElement
Array
Constructor<T>
Field
GenericArrayType
GenericDeclaration
GenericSignatureFormatError
InvocationHandler
InvocationTargetException
MalformedParameterizedTypeException
Member
Method
Modifier
ParameterizedType
Proxy
ReflectPermission
Type
TypeVariable<DextendsGenericDeclaration>
UndeclaredThrowableException
WildcardType
Chapter11.java.math
Packagejava.math
BigDecimal
BigInteger
MathContext
RoundingMode
Chapter12.java.net
Packagejava.net
Authenticator
Authenticator.RequestorType
BindException
CacheRequest
CacheResponse
ConnectException
ContentHandler
ContentHandlerFactory
CookieHandler
DatagramPacket
DatagramSocket
DatagramSocketImpl
DatagramSocketImplFactory
FileNameMap
HttpRetryException
HttpURLConnection
Inet4Address
Inet6Address
InetAddress
InetSocketAddress
JarURLConnection
MalformedURLException
MulticastSocket
NetPermission
NetworkInterface
NoRouteToHostException
PasswordAuthentication
PortUnreachableException
ProtocolException
Proxy
Proxy.Type
ProxySelector
ResponseCache
SecureCacheResponse
ServerSocket
Socket
SocketAddress
SocketException
SocketImpl
SocketImplFactory
SocketOptions
SocketPermission
SocketTimeoutException
UnknownHostException
UnknownServiceException
URI
URISyntaxException
URL
URLClassLoader
URLConnection
URLDecoder
URLEncoder
Chapter13.java.nioandSubpackages
Packagejava.nio
Buffer
BufferOverflowException
BufferUnderflowException
ByteBuffer
ByteOrder
CharBuffer
DoubleBuffer
FloatBuffer
IntBuffer
InvalidMarkException
LongBuffer
MappedByteBuffer
ReadOnlyBufferException
ShortBuffer
Packagejava.nio.channels
AlreadyConnectedException
AsynchronousCloseException
ByteChannel
CancelledKeyException
Channel
Channels
ClosedByInterruptException
ClosedChannelException
ClosedSelectorException
ConnectionPendingException
DatagramChannel
FileChannel
FileChannel.MapMode
FileLock
FileLockInterruptionException
GatheringByteChannel
IllegalBlockingModeException
IllegalSelectorException
InterruptibleChannel
NoConnectionPendingException
NonReadableChannelException
NonWritableChannelException
NotYetBoundException
NotYetConnectedException
OverlappingFileLockException
Pipe
Pipe.SinkChannel
Pipe.SourceChannel
ReadableByteChannel
ScatteringByteChannel
SelectableChannel
SelectionKey
Selector
ServerSocketChannel
SocketChannel
UnresolvedAddressException
UnsupportedAddressTypeException
WritableByteChannel
Packagejava.nio.channels.spi
AbstractInterruptibleChannel
AbstractSelectableChannel
AbstractSelectionKey
AbstractSelector
SelectorProvider
Packagejava.nio.charset
CharacterCodingException
Charset
CharsetDecoder
CharsetEncoder
CoderMalfunctionError
CoderResult
CodingErrorAction
IllegalCharsetNameException
MalformedInputException
UnmappableCharacterException
UnsupportedCharsetException
Packagejava.nio.charset.spi
CharsetProvider
Chapter14.java.securityandSubpackages
Packagejava.security
AccessControlContext
AccessControlException
AccessController
AlgorithmParameterGenerator
AlgorithmParameterGeneratorSpi
AlgorithmParameters
AlgorithmParametersSpi
AllPermission
AuthProvider
BasicPermission
Certificate
CodeSigner
CodeSource
DigestException
DigestInputStream
DigestOutputStream
DomainCombiner
GeneralSecurityException
Guard
GuardedObject
Identity
IdentityScope
InvalidAlgorithmParameterException
InvalidKeyException
InvalidParameterException
Key
KeyException
KeyFactory
KeyFactorySpi
KeyManagementException
KeyPair
KeyPairGenerator
KeyPairGeneratorSpi
KeyRep
KeyRep.Type
KeyStore
KeyStore.Builder
KeyStore.CallbackHandlerProtection
KeyStore.Entry
KeyStore.LoadStoreParameter
KeyStore.PasswordProtection
KeyStore.PrivateKeyEntry
KeyStore.ProtectionParameter
KeyStore.SecretKeyEntry
KeyStore.TrustedCertificateEntry
KeyStoreException
KeyStoreSpi
MessageDigest
MessageDigestSpi
NoSuchAlgorithmException
NoSuchProviderException
Permission
PermissionCollection
Permissions
Policy
Principal
PrivateKey
PrivilegedAction<T>
PrivilegedActionException
PrivilegedExceptionAction<T>
ProtectionDomain
Provider
Provider.Service
ProviderException
PublicKey
SecureClassLoader
SecureRandom
SecureRandomSpi
Security
SecurityPermission
Signature
SignatureException
SignatureSpi
SignedObject
Signer
Timestamp
UnrecoverableEntryException
UnrecoverableKeyException
UnresolvedPermission
Packagejava.security.cert
Certificate
Certificate.CertificateRep
CertificateEncodingException
CertificateException
CertificateExpiredException
CertificateFactory
CertificateFactorySpi
CertificateNotYetValidException
CertificateParsingException
CertPath
CertPath.CertPathRep
CertPathBuilder
CertPathBuilderException
CertPathBuilderResult
CertPathBuilderSpi
CertPathParameters
CertPathValidator
CertPathValidatorException
CertPathValidatorResult
CertPathValidatorSpi
CertSelector
CertStore
CertStoreException
CertStoreParameters
CertStoreSpi
CollectionCertStoreParameters
CRL
CRLException
CRLSelector
LDAPCertStoreParameters
PKIXBuilderParameters
PKIXCertPathBuilderResult
PKIXCertPathChecker
PKIXCertPathValidatorResult
PKIXParameters
PolicyNode
PolicyQualifierInfo
TrustAnchor
X509Certificate
X509CertSelector
X509CRL
X509CRLEntry
X509CRLSelector
X509Extension
Packagejava.security.interfaces
DSAKey
DSAKeyPairGenerator
DSAParams
DSAPrivateKey
DSAPublicKey
ECKey
ECPrivateKey
ECPublicKey
RSAKey
RSAMultiPrimePrivateCrtKey
RSAPrivateCrtKey
RSAPrivateKey
RSAPublicKey
Packagejava.security.spec
AlgorithmParameterSpec
DSAParameterSpec
DSAPrivateKeySpec
DSAPublicKeySpec
ECField
ECFieldF2m
ECFieldFp
ECGenParameterSpec
ECParameterSpec
ECPoint
ECPrivateKeySpec
ECPublicKeySpec
EllipticCurve
EncodedKeySpec
InvalidKeySpecException
InvalidParameterSpecException
KeySpec
MGF1ParameterSpec
PKCS8EncodedKeySpec
PSSParameterSpec
RSAKeyGenParameterSpec
RSAMultiPrimePrivateCrtKeySpec
RSAOtherPrimeInfo
RSAPrivateCrtKeySpec
RSAPrivateKeySpec
RSAPublicKeySpec
X509EncodedKeySpec
Chapter15.java.text
Packagejava.text
Annotation
AttributedCharacterIterator
AttributedCharacterIterator.Attribute
AttributedString
Bidi
BreakIterator
CharacterIterator
ChoiceFormat
CollationElementIterator
CollationKey
Collator
DateFormat
DateFormat.Field
DateFormatSymbols
DecimalFormat
DecimalFormatSymbols
FieldPosition
Format
Format.Field
MessageFormat
MessageFormat.Field
NumberFormat
NumberFormat.Field
ParseException
ParsePosition
RuleBasedCollator
SimpleDateFormat
StringCharacterIterator
Chapter16.java.utilandSubpackages
Packagejava.util
AbstractCollection<E>
AbstractList<E>
AbstractMap<K,V>
AbstractQueue<E>
AbstractSequentialList<E>
AbstractSet<E>
ArrayList<E>
Arrays
BitSet
Calendar
Collection<E>
Collections
Comparator<T>
ConcurrentModificationException
Currency
Date
Dictionary<K,V>
DuplicateFormatFlagsException
EmptyStackException
Enumeration<E>
EnumMap
EnumSet
EventListener
EventListenerProxy
EventObject
FormatFlagsConversionMismatchException
Formattable
FormattableFlags
Formatter
Formatter.BigDecimalLayoutForm
FormatterClosedException
GregorianCalendar
HashMap<K,V>
HashSet<E>
Hashtable<K,V>
IdentityHashMap<K,V>
IllegalFormatCodePointException
IllegalFormatConversionException
IllegalFormatException
IllegalFormatFlagsException
IllegalFormatPrecisionException
IllegalFormatWidthException
InputMismatchException
InvalidPropertiesFormatException
Iterator<E>
LinkedHashMap<K,V>
LinkedHashSet<E>
LinkedList<E>
List<E>
ListIterator<E>
ListResourceBundle
Locale
Map<K,V>
Map.Entry<K,V>
MissingFormatArgumentException
MissingFormatWidthException
MissingResourceException
NoSuchElementException
Observable
Observer
PriorityQueue<E>
Properties
PropertyPermission
PropertyResourceBundle
Queue<E>
Random
RandomAccess
ResourceBundle
Scanner
Set<E>
SimpleTimeZone
SortedMap<K,V>
SortedSet<E>
Stack<E>
StringTokenizer
Timer
TimerTask
TimeZone
TooManyListenersException
TreeMap<K,V>
TreeSet<E>
UnknownFormatConversionException
UnknownFormatFlagsException
UUID
Vector<E>
WeakHashMap<K,V>
Packagejava.util.concurrent
AbstractExecutorService
ArrayBlockingQueue<E>
BlockingQueue<E>
BrokenBarrierException
Callable<V>
CancellationException
CompletionService<V>
ConcurrentHashMap<K,V>
ConcurrentLinkedQueue<E>
ConcurrentMap<K,V>
CopyOnWriteArrayList<E>
CopyOnWriteArraySet<E>
CountDownLatch
CyclicBarrier
Delayed
DelayQueue<EextendsDelayed>
Exchanger<V>
ExecutionException
Executor
ExecutorCompletionService<V>
Executors
ExecutorService
Future<V>
FutureTask<V>
LinkedBlockingQueue<E>
PriorityBlockingQueue<E>
RejectedExecutionException
RejectedExecutionHandler
ScheduledExecutorService
ScheduledFuture<V>
ScheduledThreadPoolExecutor
Semaphore
SynchronousQueue<E>
ThreadFactory
ThreadPoolExecutor
ThreadPoolExecutor.AbortPolicy
ThreadPoolExecutor.CallerRunsPolicy
ThreadPoolExecutor.DiscardOldestPolicy
ThreadPoolExecutor.DiscardPolicy
TimeoutException
TimeUnit
Packagejava.util.concurrent.atomic
AtomicBoolean
AtomicInteger
AtomicIntegerArray
AtomicIntegerFieldUpdater<T>
AtomicLong
AtomicLongArray
AtomicLongFieldUpdater<T>
AtomicMarkableReference<V>
AtomicReference<V>
AtomicReferenceArray<E>
AtomicReferenceFieldUpdater<T,V>
AtomicStampedReference<V>
Packagejava.util.concurrent.locks
AbstractQueuedSynchronizer
AbstractQueuedSynchronizer.ConditionObject
Condition
Lock
LockSupport
ReadWriteLock
ReentrantLock
ReentrantReadWriteLock
ReentrantReadWriteLock.ReadLock
ReentrantReadWriteLock.WriteLock
Packagejava.util.jar
Attributes
Attributes.Name
JarEntry