Pro Java 7 NIO. 2 /
Pro Java 7 NIO. 2 addresses the three primary elements that offer new input/output (I/O) APIs in Java 7, giving you the skills to write robust, scalable Java applications: An extensive file I/O API system addresses feature requests that developers have sought since the inception of the JDK A socket...
Clasificación: | Libro Electrónico |
---|---|
Autor principal: | |
Formato: | Electrónico eBook |
Idioma: | Inglés |
Publicado: |
Berkeley, CA : New York :
Apress ; Distributed by the Book trade by Springer,
Ã2011.
|
Colección: | Expert's voice in Java.
|
Temas: | |
Acceso en línea: | Texto completo (Requiere registro previo con correo institucional) |
Tabla de Contenidos:
- Machine generated contents note: ch. 1 Working with the Path Class
- Introducing the Path Class
- Defining a Path
- Define an Absolute Path
- Define a Path Relative to the File Store Root
- Define a Path Relative to the Working Folder
- Define a Path Using Shortcuts
- Define a Path from a URI
- Define a Path using FileSystems.getDefault().getPath() Method
- Get the Path of the Home Directory
- Getting Information About a Path
- Get the Path File/Directory Name
- Get the Path Root
- Get the Path Parent
- Get Path Name Elements
- Get a Path Subpath
- Converting a Path
- Convert a Path to a String
- Convert a Path to a URI
- Convert a Relative Path to an Absolute Path
- Convert a Path to a Real Path
- Convert a Path to a File
- Combining Two Paths
- Constructing a Path Between Two Locations
- Comparing Two Paths
- Iterate over the Name Elements of a Path
- Summary
- ch. 2 Metadata File Attributes
- Supported Views in NIO. 2.
- Note continued: Determining Views Supported by a Particular File System
- Basic View
- Get Bulk Attributes with readAttributes()
- Get a Single Attribute with getAttribute()
- Update a Basic Attribute
- DOS View
- File Owner View
- Set a File Owner Using Files.setOwner()
- Set a File Owner Using FileOwnerAttributeView.setOwner()
- Set a File Owner Using Files.setAttribute()
- Get a File Owner Using FileOwnerAttributeView.getOwner()
- Get a File Owner Using Files.getAttribute()
- POSIX View
- POSIX Permissions
- POSIX Group Owner
- ACL View
- Read an ACL Using Files.getFileAttributeView()
- Read an ACL Using Files.getAttribute()
- Read ACL Entries
- Grant a New Access in an ACL
- File Store Attributes
- Get Attributes of All File Stores
- Get Attributes of the File Store in Which a File Resides
- User-Defined File Attributes View
- Check User-Defined Attributes Supportability
- Operations on User-Defined Attributes
- Summary.
- Note continued: ch. 3 Manage Symbolic and Hard Links
- Introducing Links
- Creating Links from the Command Line
- Creating a Symbolic Link
- Creating a Hard Link
- Checking a Symbolic Link
- Locating the Target of a Link
- Checking If a Link and a Target Point to the Same File
- Summary
- ch. 4 Files and Directories
- Checking Methods for Files and Directories
- Checking for the Existence of a File or Directory
- Checking File Accessibility
- Checking If Two Paths Point to the Same File
- Checking the File Visibility
- Creating and Reading Directories
- Listing File System Root Directories
- Creating a New Directory
- Listing a Directory's Content
- Creating, Reading, and Writing Files
- Using Standard Open Options
- Creating a New File
- Writing a Small File
- Reading a Small File
- Working with Buffered Streams
- Working with Unbuffered Streams
- Creating Temporary Directories and Files
- Creating a Temporary Directory.
- Note continued: Creating Temporary Files
- Deleting, Copying, and Moving Directories and Files
- Rename a File
- Summary
- ch. 5 Recursive Operations: Walks
- The FileVisitor Interface
- FileVisitor.visitFile() Method
- FileVisitor.preVisitDirectory() Method
- FileVisitor.postVisitDirectory() Method
- FileVisitor.visitFileFailed() Method
- The SimpleFileVisitor Class
- Starting the Recursive Process
- Common Walks
- Writing a File Search Application
- Writing a File Delete Application
- Writing a Copy Files Application
- Writing a Move Files Application
- Summary
- ch. 6 Watch Service API
- The Watch Service API Classes
- Implementing a Watch Service
- Creating a WatchService
- Registering Objects with the Watch Service
- Waiting for the Incoming Events
- Getting a Watch Key
- Retrieving Pending Events for a Key
- Retrieving the Event Type and Count
- Retrieving the File Name Associated with an Event
- Putting the Key Back in Ready State.
- Note continued: Closing the Watch Service
- Gluing It All Together
- Other Examples of Using a Watch Service
- Watching a Directory Tree
- Watching a Video Camera
- Watching a Printer Tray System
- Summary
- ch. 7 Random Access Files
- Brief Overview of ByteBuffer
- ByteBuffer Properties
- ByteBuffer Ancestor Methods
- Brief Overview of Channels
- Using the SeekableByteChannel Interface for Random Access to Files
- Reading a File with SeekableByteChannel
- Writing a File with SeekableByteChannel
- SeekableByteChannel and File Attributes
- Reading a File with the Old ReadableByteChannel Interface
- Writing a File with the Old WritableByteChannel Interface
- Playing with SeekableByteChannel Position
- Working with FileChannel
- Mapping a Channel's File Region Directly into Memory
- Locking a Channel's File
- Copying Files with FileChannel
- Summary
- ch. 8 The Sockets APIs
- NetworkChannel Overview
- Socket Options.
- Note continued: Writing TCP Server/Client Applications
- Blocking vs. Non-Blocking Mechanisms
- Writing a Blocking TCP Server
- Writing a Blocking TCP Client
- Testing the Blocking Echo Application
- Writing a Non-Blocking TCP Client/Server Application
- Writing UDP Server/Client Applications
- Writing a UDP Server
- Writing a Connectionless UDP Client
- Testing the UDP Connectionless Echo Application
- Writing a Connected UDP Client
- Testing the UDP Connected Echo Application
- Multicasting
- Testing the UDP Multicast Application
- Summary
- ch. 9 The Asynchronous Channel API
- Synchronous I/O vs. Asynchronous I/O
- Asynchronous I/O Big Picture
- Pending Result and the Future Class
- Complete Result and the CompletionHandler Interface
- Types of Asynchronous Channels
- Groups
- ByteBuffer Considerations
- Introducing the ExecutorService API
- Developing Asynchronous Applications
- Asynchronous File Channel Examples.
- Note continued: Asynchronous Channel Sockets Examples
- Summary
- ch. 10 Important Things to Remember
- Refactoring java.io. File Code
- Working with the ZIP File System Provider
- Considerations on Developing a Custom File System Provider
- Creating a Custom File System Provider Class
- Creating a Custom File System Class
- Useful Methods
- Default File System
- File Stores
- Path of a File
- Path String Separator.