This document discusses Java IO streams. It defines streams as a "flow" of data associated with input/output devices. There are two main types of streams: input streams which obtain data from sources like keyboards, and output streams which send data to destinations like displays. The document outlines the hierarchy of stream classes and interfaces in Java and describes various stream types including byte streams, character streams, buffered streams, and standard I/O streams. It provides examples of using FileInputStream and FileOutputStream to copy bytes between files.
This document provides an overview of binary input and output (I/O) in Java. It discusses the different stream classes for reading and writing bytes and characters, including FileInputStream, FileOutputStream, DataInputStream and DataOutputStream. It also covers reading and writing primitive values, strings, and objects to binary files. RandomAccessFile is introduced for random access to files.
This document provides an overview of input/output (I/O) and threading concepts covered in Module 4 of the OODP syllabus. It discusses Java stream classes for byte and character I/O, including reading console input and working with files. It also covers the thread model in Java and using the Thread class and Runnable interface. The summary discusses I/O basics like input/output sources and destinations, and how Java represents data flows using streams. It also provides examples of using byte streams like DataInputStream and character streams like BufferedReader to perform I/O operations in Java programs.
The document discusses Java I/O streams and network programming. It provides an overview of input/output streams, readers/writers, and common stream classes in Java like FileInputStream, FileOutputStream, BufferedReader, PrintWriter and others. Key stream concepts like available(), read(), write(), close() are explained. Examples of reading from and writing to files and memory are given.
The BitInputStream and BitOutputStream classes allow reading and writing of data in bit-level granularity between 1-32 bits. BitInputStream extends InputStream and can read bit sequences from Files or other InputStreams, while BitOutputStream extends OutputStream and can write bit sequences to OutputStreams or Files. These classes provide methods to read/write bits, as well as close, flush, and reset functionality.
This document contains the code for BitInputStream and BitOutputStream classes that allow reading and writing of bits from input and output streams. The BitInputStream class extends InputStream to read bits from an underlying input stream. It supports reading a specified number of bits and resetting the stream if constructed from a File. The BitOutputStream class extends OutputStream to write bits to an underlying output stream. It supports writing a specified number of bits and flushing any unwritten bits.
The document describes classes and methods related to Huffman coding. It includes classes for reading and writing bits, processing Huffman compression and decompression, building Huffman trees with TreeNode, and a GUI viewer class HuffViewer. Key methods compress and uncompress data, preprocess data for compression, build the Huffman tree, and read/write bits from streams.
This document provides an overview of Java I/O including different types of I/O, how Java supports I/O through streams and classes like File, serialization, compression, Console, and Properties. It discusses byte and character streams, buffered streams, reading/writing files, and preferences. Key points are that Java I/O uses streams as an abstraction, byte streams operate on bytes while character streams use characters, and buffered streams improve efficiency by buffering reads/writes.
This document provides an overview of binary input and output (I/O) in Java. It discusses the different stream classes for reading and writing bytes and characters, including FileInputStream, FileOutputStream, DataInputStream and DataOutputStream. It also covers reading and writing primitive values, strings, and objects to binary files. RandomAccessFile is introduced for random access to files.
This document provides an overview of input/output (I/O) and threading concepts covered in Module 4 of the OODP syllabus. It discusses Java stream classes for byte and character I/O, including reading console input and working with files. It also covers the thread model in Java and using the Thread class and Runnable interface. The summary discusses I/O basics like input/output sources and destinations, and how Java represents data flows using streams. It also provides examples of using byte streams like DataInputStream and character streams like BufferedReader to perform I/O operations in Java programs.
The document discusses Java I/O streams and network programming. It provides an overview of input/output streams, readers/writers, and common stream classes in Java like FileInputStream, FileOutputStream, BufferedReader, PrintWriter and others. Key stream concepts like available(), read(), write(), close() are explained. Examples of reading from and writing to files and memory are given.
The BitInputStream and BitOutputStream classes allow reading and writing of data in bit-level granularity between 1-32 bits. BitInputStream extends InputStream and can read bit sequences from Files or other InputStreams, while BitOutputStream extends OutputStream and can write bit sequences to OutputStreams or Files. These classes provide methods to read/write bits, as well as close, flush, and reset functionality.
This document contains the code for BitInputStream and BitOutputStream classes that allow reading and writing of bits from input and output streams. The BitInputStream class extends InputStream to read bits from an underlying input stream. It supports reading a specified number of bits and resetting the stream if constructed from a File. The BitOutputStream class extends OutputStream to write bits to an underlying output stream. It supports writing a specified number of bits and flushing any unwritten bits.
The document describes classes and methods related to Huffman coding. It includes classes for reading and writing bits, processing Huffman compression and decompression, building Huffman trees with TreeNode, and a GUI viewer class HuffViewer. Key methods compress and uncompress data, preprocess data for compression, build the Huffman tree, and read/write bits from streams.
This document provides an overview of Java I/O including different types of I/O, how Java supports I/O through streams and classes like File, serialization, compression, Console, and Properties. It discusses byte and character streams, buffered streams, reading/writing files, and preferences. Key points are that Java I/O uses streams as an abstraction, byte streams operate on bytes while character streams use characters, and buffered streams improve efficiency by buffering reads/writes.
In Java, Input and Output (I/O) are used to process the input and produce the output.
This means an input stream can abstract many different input kinds: from a disk file, a keyboard, or a network socket. Likewise, an output stream may refer to the console, a disk file, or a network connection.
The document discusses Java streams and I/O. It defines streams as abstract representations of input/output devices that are sources or destinations of data. It describes byte and character streams, the core stream classes in java.io, predefined System streams, common stream subclasses, reading/writing files and binary data with byte streams, and reading/writing characters with character streams. It also covers object serialization/deserialization and compressing files with GZIP.
This document discusses I/O streams in Java. It defines streams as sequences of bytes that flow from a source to a destination. Streams can be categorized as character streams for text data or byte streams for raw binary data. Streams are also categorized as data streams that act as sources or destinations, or processing streams that alter or manage stream information. The Java IO package contains classes for defining input and output streams of different types.
The document discusses techniques, challenges, and best practices for handling input/output (I/O) operations in Java. It covers the different types of I/O, how Java supports I/O through streams and readers/writers, issues with streams, alternatives like NIO that support non-blocking I/O using buffers and channels, and "Hiranya's Laws" with guidelines for proper I/O handling.
The document discusses Java input/output (I/O) streams. It covers character streams like Reader and Writer, byte streams like InputStream and OutputStream, and file I/O using FileInputStream, FileOutputStream, and RandomAccessFile. Example code is provided to demonstrate reading input from the console, writing to and reading from files, and using seek and getFilePointer methods of RandomAccessFile.
The document discusses Java I/O and provides an overview of key concepts like streams, readers/writers, files, serialization, and tokenization. It describes the different types of input/output streams, readers, and writers in Java and best practices for working with them. Examples are provided to demonstrate reading from and writing to files, streams, and using serialization and tokenization.
Streams are used to transfer data between a program and source/destination. They transfer data independently of the source/destination. Streams are classified as input or output streams depending on the direction of data transfer, and as byte or character streams depending on how the data is carried. Common stream classes in Java include FileInputStream, FileOutputStream, FileReader, and FileWriter for reading from and writing to files. Exceptions like FileNotFoundException may occur if a file cannot be opened.
The document discusses input/output (I/O) and serialization in Java. It covers the core I/O packages that support console and file I/O, as well as the new I/O package. It also describes object serialization which allows objects to be written to streams and read back without defining additional methods, enabling object transmission over networks. Key I/O classes include InputStream, OutputStream, Reader and Writer.
The document discusses various Java I/O streams including input streams, output streams, byte streams, character streams, buffered streams, properties class, print stream, file locking, serialization and print writer class. It provides examples of reading and writing files using FileInputStream, FileOutputStream, FileReader, FileWriter and other stream classes. Methods of different stream classes are also explained along with their usage.
This document provides an overview of Java input-output (I/O) streams and classes. It discusses the core stream classes like InputStream, OutputStream, Reader, Writer and their subclasses like FileInputStream, FileOutputStream, FileReader, FileWriter. It also covers buffered stream classes like BufferedInputStream, BufferedOutputStream, BufferedReader, BufferedWriter which provide better performance. Examples are given to demonstrate reading, writing and file handling using these stream classes.
This document discusses Java I/O and streams. It begins by introducing files and the File class, which provides methods for obtaining file properties and manipulating files. It then discusses reading and writing files using byte streams like FileInputStream and FileOutputStream. Character streams like PrintWriter and BufferedReader are presented for console I/O. Other stream classes covered include buffered streams, object streams for serialization, and data streams for primitive types. The key methods of various stream classes are listed.
The document discusses Java I/O streams and network programming. It covers stream concepts, input streams, output streams, readers, writers, and object serialization. Input streams support reading functions while output streams support writing functions. There are two main groups of I/O classes in Java - input/output streams that handle bytes, and reader/writer classes that handle characters. Common stream types include file streams, memory streams, pipe streams, and object streams.
This document discusses file handling in C++. It defines text and binary files, and describes classes like ofstream, ifstream, and fstream that are used for file input/output. It explains how to open, close, read from, and write to files, and describes functions for input/output of single characters and blocks of data. It also covers error handling functions and manipulating file pointers using methods like seekg() and seekp().
The document discusses files, streams, and different classes in Java for reading and writing files and streams. It explains that files exist on a local file system while streams represent a flow of characters. It also discusses the process of opening, reading from, and closing files, as well as using classes like FileReader, FileWriter, FileInputStream and FileOutputStream for reading/writing characters and bytes. It recommends using BufferedReader and BufferedWriter for more efficient reading of lines and writing of strings.
Java I/O (Input and Output) is used to process the feedback and produce the outcome based on the feedback. Java uses the idea of circulation to make I/O function fast. The java.io package contains all the sessions required for feedback and outcome functions.
This document provides an overview of file handling in C++. It discusses different file types like text files and binary files. It introduces classes like ofstream, ifstream, and fstream for file stream operations like opening, closing, reading, and writing to files. It also covers error handling functions and manipulating file pointers using functions like seekg(), seekp(), tellg(), and tellp().
This document discusses C++ streams and stream classes. It explains that streams represent the flow of data in C++ programs and are controlled using classes. The key classes are istream for input, ostream for output, and fstream for file input/output. It provides examples of reading from and writing to files using fstream, and describes various stream manipulators like endl. The document also discusses the filebuf and streambuf base classes that perform low-level input/output operations.
The document provides information about Java presentation materials on file input/output (I/O). It discusses the Path and File classes for working with file paths and names. It also covers reading and writing files using FileInputStream, FileOutputStream, FileReader, FileWriter, InputStream, OutputStream, InputStreamReader, OutputStreamWriter, serialization, and random access files. The presentation includes code examples for creating files and paths, reading and writing files, and serializing/deserializing objects.
This document discusses Java I/O streams. It defines streams as representing input sources or output destinations that can represent files, devices, programs, sockets or memory arrays. Streams support different data types like bytes, primitive types, characters or objects. The document outlines the stream class hierarchy with abstract classes like InputStream, OutputStream, Reader and Writer. It describes node streams that interface directly with a source/destination and filter streams that add functionality. Examples of byte and character streams like FileInputStream and FileReader are provided.
The document discusses input/output (I/O) in Java, including byte streams, character streams, and reading/writing to the console. It covers:
1) Byte and character streams for handling input/output of bytes and characters respectively. Character streams use Unicode for internationalization.
2) The InputStream, OutputStream, Reader, and Writer classes used for byte and character I/O.
3) Reading input from the console using a BufferedReader connected to System.in, and writing output using PrintStream/PrintWriter connected to System.out.
File input and output operations in Java are performed using streams. There are two types of streams - byte streams and character streams. Byte streams handle input/output at the byte level while character streams handle input/output at the character level using Unicode encoding. The File class in Java represents files and directories on the filesystem and provides methods to perform operations like creating, reading, updating and deleting files.
In Java, Input and Output (I/O) are used to process the input and produce the output.
This means an input stream can abstract many different input kinds: from a disk file, a keyboard, or a network socket. Likewise, an output stream may refer to the console, a disk file, or a network connection.
The document discusses Java streams and I/O. It defines streams as abstract representations of input/output devices that are sources or destinations of data. It describes byte and character streams, the core stream classes in java.io, predefined System streams, common stream subclasses, reading/writing files and binary data with byte streams, and reading/writing characters with character streams. It also covers object serialization/deserialization and compressing files with GZIP.
This document discusses I/O streams in Java. It defines streams as sequences of bytes that flow from a source to a destination. Streams can be categorized as character streams for text data or byte streams for raw binary data. Streams are also categorized as data streams that act as sources or destinations, or processing streams that alter or manage stream information. The Java IO package contains classes for defining input and output streams of different types.
The document discusses techniques, challenges, and best practices for handling input/output (I/O) operations in Java. It covers the different types of I/O, how Java supports I/O through streams and readers/writers, issues with streams, alternatives like NIO that support non-blocking I/O using buffers and channels, and "Hiranya's Laws" with guidelines for proper I/O handling.
The document discusses Java input/output (I/O) streams. It covers character streams like Reader and Writer, byte streams like InputStream and OutputStream, and file I/O using FileInputStream, FileOutputStream, and RandomAccessFile. Example code is provided to demonstrate reading input from the console, writing to and reading from files, and using seek and getFilePointer methods of RandomAccessFile.
The document discusses Java I/O and provides an overview of key concepts like streams, readers/writers, files, serialization, and tokenization. It describes the different types of input/output streams, readers, and writers in Java and best practices for working with them. Examples are provided to demonstrate reading from and writing to files, streams, and using serialization and tokenization.
Streams are used to transfer data between a program and source/destination. They transfer data independently of the source/destination. Streams are classified as input or output streams depending on the direction of data transfer, and as byte or character streams depending on how the data is carried. Common stream classes in Java include FileInputStream, FileOutputStream, FileReader, and FileWriter for reading from and writing to files. Exceptions like FileNotFoundException may occur if a file cannot be opened.
The document discusses input/output (I/O) and serialization in Java. It covers the core I/O packages that support console and file I/O, as well as the new I/O package. It also describes object serialization which allows objects to be written to streams and read back without defining additional methods, enabling object transmission over networks. Key I/O classes include InputStream, OutputStream, Reader and Writer.
The document discusses various Java I/O streams including input streams, output streams, byte streams, character streams, buffered streams, properties class, print stream, file locking, serialization and print writer class. It provides examples of reading and writing files using FileInputStream, FileOutputStream, FileReader, FileWriter and other stream classes. Methods of different stream classes are also explained along with their usage.
This document provides an overview of Java input-output (I/O) streams and classes. It discusses the core stream classes like InputStream, OutputStream, Reader, Writer and their subclasses like FileInputStream, FileOutputStream, FileReader, FileWriter. It also covers buffered stream classes like BufferedInputStream, BufferedOutputStream, BufferedReader, BufferedWriter which provide better performance. Examples are given to demonstrate reading, writing and file handling using these stream classes.
This document discusses Java I/O and streams. It begins by introducing files and the File class, which provides methods for obtaining file properties and manipulating files. It then discusses reading and writing files using byte streams like FileInputStream and FileOutputStream. Character streams like PrintWriter and BufferedReader are presented for console I/O. Other stream classes covered include buffered streams, object streams for serialization, and data streams for primitive types. The key methods of various stream classes are listed.
The document discusses Java I/O streams and network programming. It covers stream concepts, input streams, output streams, readers, writers, and object serialization. Input streams support reading functions while output streams support writing functions. There are two main groups of I/O classes in Java - input/output streams that handle bytes, and reader/writer classes that handle characters. Common stream types include file streams, memory streams, pipe streams, and object streams.
This document discusses file handling in C++. It defines text and binary files, and describes classes like ofstream, ifstream, and fstream that are used for file input/output. It explains how to open, close, read from, and write to files, and describes functions for input/output of single characters and blocks of data. It also covers error handling functions and manipulating file pointers using methods like seekg() and seekp().
The document discusses files, streams, and different classes in Java for reading and writing files and streams. It explains that files exist on a local file system while streams represent a flow of characters. It also discusses the process of opening, reading from, and closing files, as well as using classes like FileReader, FileWriter, FileInputStream and FileOutputStream for reading/writing characters and bytes. It recommends using BufferedReader and BufferedWriter for more efficient reading of lines and writing of strings.
Java I/O (Input and Output) is used to process the feedback and produce the outcome based on the feedback. Java uses the idea of circulation to make I/O function fast. The java.io package contains all the sessions required for feedback and outcome functions.
This document provides an overview of file handling in C++. It discusses different file types like text files and binary files. It introduces classes like ofstream, ifstream, and fstream for file stream operations like opening, closing, reading, and writing to files. It also covers error handling functions and manipulating file pointers using functions like seekg(), seekp(), tellg(), and tellp().
This document discusses C++ streams and stream classes. It explains that streams represent the flow of data in C++ programs and are controlled using classes. The key classes are istream for input, ostream for output, and fstream for file input/output. It provides examples of reading from and writing to files using fstream, and describes various stream manipulators like endl. The document also discusses the filebuf and streambuf base classes that perform low-level input/output operations.
The document provides information about Java presentation materials on file input/output (I/O). It discusses the Path and File classes for working with file paths and names. It also covers reading and writing files using FileInputStream, FileOutputStream, FileReader, FileWriter, InputStream, OutputStream, InputStreamReader, OutputStreamWriter, serialization, and random access files. The presentation includes code examples for creating files and paths, reading and writing files, and serializing/deserializing objects.
This document discusses Java I/O streams. It defines streams as representing input sources or output destinations that can represent files, devices, programs, sockets or memory arrays. Streams support different data types like bytes, primitive types, characters or objects. The document outlines the stream class hierarchy with abstract classes like InputStream, OutputStream, Reader and Writer. It describes node streams that interface directly with a source/destination and filter streams that add functionality. Examples of byte and character streams like FileInputStream and FileReader are provided.
The document discusses input/output (I/O) in Java, including byte streams, character streams, and reading/writing to the console. It covers:
1) Byte and character streams for handling input/output of bytes and characters respectively. Character streams use Unicode for internationalization.
2) The InputStream, OutputStream, Reader, and Writer classes used for byte and character I/O.
3) Reading input from the console using a BufferedReader connected to System.in, and writing output using PrintStream/PrintWriter connected to System.out.
File input and output operations in Java are performed using streams. There are two types of streams - byte streams and character streams. Byte streams handle input/output at the byte level while character streams handle input/output at the character level using Unicode encoding. The File class in Java represents files and directories on the filesystem and provides methods to perform operations like creating, reading, updating and deleting files.
The document discusses I/O streams in Java. It describes that streams represent input sources and output destinations and come in two types - input streams for reading data and output streams for writing data. Standard streams like System.in and System.out are used for input and output. Various classes are used for byte streams like FileInputStream and character streams like FileReader. Methods of classes like BufferedReader, DataInputStream, Scanner, FileInputStream and FileOutputStream are explained for reading and writing data.
In this tutorial, I take you through an important feature of Java: File Operations. We are going to take a look at Character and Byte Streams, some built-in Classes and their functionalities to be able to perform file operations. Then we are going to learn about a famous concept called exception handling. We are going to finalize this tutorial with Number Formatting.
Check out rest of the Tutorials: https://berksoysal.blogspot.com/2016/06/java-se-tutorials-basics-exercises.html
Computer science input and output BASICS.pptxRathanMB
Stream is a sequence of data that supports methods to read or write data. There are two types of streams in Java - byte streams and character streams. Byte streams are used for input/output of bytes while character streams are used for input/output of Unicode characters. The java.io package contains classes for input/output in Java, including abstract classes like InputStream and OutputStream for byte streams, and Reader and Writer for character streams. System.in, System.out and System.err are predefined streams for input, output and errors respectively.
This document discusses files and streams in Java. It covers key concepts like:
- Streams represent sources of input or destinations of output and support different data types.
- Input streams read data from sources one item at a time, while output streams write to destinations.
- Byte streams handle raw bytes, while character streams automatically translate character encodings.
- Common stream classes include FileInputStream, FileOutputStream, FileReader and FileWriter for file I/O.
- The predefined System streams like System.in and System.out represent standard input/output.
The document discusses Java I/O streams and collections framework. It covers byte streams, character streams, reading console input, writing console output, and reading and writing files. It also discusses different I/O stream classes like InputStream, OutputStream, Reader, Writer and their subclasses. It provides examples of reading input from the keyboard and writing output to the console using System.in, System.out and System.err streams. It also discusses reading characters and strings from the keyboard using BufferedReader class.
- Java performs I/O through streams which are abstractions that produce or consume data and are linked to physical devices.
- There are two types of streams in Java: byte streams which handle input/output of bytes and character streams which handle input/output of characters more efficiently.
- The main classes for byte streams are InputStream, OutputStream and their subclasses like FileInputStream and FileOutputStream. The main classes for character streams are Reader and Writer.
- The predefined streams System.in, System.out and System.err represent standard input, standard output and standard error streams in Java.
The document discusses Java's stream-based input/output capabilities provided by the java.io package. It describes the different types of streams like input streams, output streams, binary streams, character streams. It covers classes like InputStream, OutputStream, DataInputStream, DataOutputStream and how to read from and write to files using FileInputStream and FileOutputStream. It also discusses formatting output, accessing files and directories, and filtering stream content.
This document provides an overview of Java input/output (I/O) fundamentals and networking. It describes how to construct node and processing streams and use readers and writers. It also explains the TCP/IP protocol and how to use ServerSocket and Socket classes to implement TCP/IP clients and servers. Key classes covered include InputStream, OutputStream, Reader, Writer, and their subclasses.
The document discusses Java I/O streams, which allow programs to read and write data. It describes the different types of streams for reading bytes and characters from sources like files, pipes, and memory. It also covers serialization which allows objects to save their state to a byte stream that can later be used to recreate the object.
Java I/O (Input and Output) is used to process the feedback and produce the outcome based on the feedback. Java uses the idea of circulation to make I/O function fast. The java.io package contains all the sessions required for feedback and outcome functions.
C++ has no built-in Input/Output (IO) capability. Instead, this capability is provided by a library. The standard C++ IO library is called the iostream library. The definition of the library classes is divided into three header files. An additional header file defines a set of manipulators which act on streams. These are summarized by Table 11.1.
Figure 11.1 relates these header files to a class hierarchy for a UNIX-based implementation of the iostream class hierarchy. The highest-level classes appear unshaded.
This document provides an overview of Java I/O streams. It discusses the stream class hierarchy with abstract classes like InputStream, OutputStream, Reader and Writer at the top. It describes different types of streams like byte streams, character streams, buffered streams, and standard I/O streams. It provides examples of reading and writing files using FileInputStream, FileOutputStream, FileReader and FileWriter. It also discusses data streams for binary I/O of primitive data types.
The DataOutputStream class allows applications to write primitive Java data types in a portable way to an output stream. It extends the OutputStream class and implements the DataOutput interface. A DataOutputStream is constructed by passing an OutputStream, and can then be used to write data types like strings, booleans, and integers to the underlying stream using methods like writeUTF(), writeBoolean(), and writeInt(). It also contains methods like flush() and close() to flush or close the stream.
The document provides information on Java APIs, IO packages, streams, serialization, networking and TCP sockets. It defines that an API allows communication between programs, Java IO handles input/output through streams, and common IO classes include FileInputStream, FileOutputStream. Networking concepts covered include sockets, ports, IP addresses and protocols like TCP. TCP sockets in Java use Socket and ServerSocket classes.
This document discusses Java I/O streams. It defines streams as representing input sources or output destinations that can represent files, devices, programs, sockets or memory arrays. Streams support different data types like bytes, primitive types, characters or objects. The document outlines the stream class hierarchy with abstract classes like InputStream, OutputStream, Reader and Writer. It describes node streams that interact with specific locations and filter streams that process or alter data. Examples of byte streams like FileInputStream and character streams like FileReader are provided.
This document provides information on input/output operations, file handling, and serialization in Java. It discusses Java's input and output streams for reading and writing bytes and characters. It describes classes for working with files like File, FileInputStream, FileOutputStream, FileReader, and FileWriter. Examples are given for reading from and writing to files and the console. The document also introduces serialization in Java for converting objects to byte streams for storage or transmission.
This document discusses Java file input/output and streams. It covers the core stream classes like InputStream, OutputStream, Reader and Writer and their subclasses. File and FileInputStream/FileOutputStream allow working with files and directories on the file system. The key abstraction is streams, which are linked to physical devices and provide a way to send and receive data through classes that perform input or output of bytes or characters.
The document discusses Java input/output (I/O) streams. It covers byte streams like FileInputStream and FileOutputStream for reading and writing bytes. It also covers character streams like FileReader and FileWriter for reading and writing characters. Filtered streams like BufferedInputStream are discussed which add functionality to underlying streams. The document also covers random access files and the File class.
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUpanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-notes-und-domino-lizenzkostenreduzierung-in-der-welt-von-dlau/
DLAU und die Lizenzen nach dem CCB- und CCX-Modell sind für viele in der HCL-Community seit letztem Jahr ein heißes Thema. Als Notes- oder Domino-Kunde haben Sie vielleicht mit unerwartet hohen Benutzerzahlen und Lizenzgebühren zu kämpfen. Sie fragen sich vielleicht, wie diese neue Art der Lizenzierung funktioniert und welchen Nutzen sie Ihnen bringt. Vor allem wollen Sie sicherlich Ihr Budget einhalten und Kosten sparen, wo immer möglich. Das verstehen wir und wir möchten Ihnen dabei helfen!
Wir erklären Ihnen, wie Sie häufige Konfigurationsprobleme lösen können, die dazu führen können, dass mehr Benutzer gezählt werden als nötig, und wie Sie überflüssige oder ungenutzte Konten identifizieren und entfernen können, um Geld zu sparen. Es gibt auch einige Ansätze, die zu unnötigen Ausgaben führen können, z. B. wenn ein Personendokument anstelle eines Mail-Ins für geteilte Mailboxen verwendet wird. Wir zeigen Ihnen solche Fälle und deren Lösungen. Und natürlich erklären wir Ihnen das neue Lizenzmodell.
Nehmen Sie an diesem Webinar teil, bei dem HCL-Ambassador Marc Thomas und Gastredner Franz Walder Ihnen diese neue Welt näherbringen. Es vermittelt Ihnen die Tools und das Know-how, um den Überblick zu bewahren. Sie werden in der Lage sein, Ihre Kosten durch eine optimierte Domino-Konfiguration zu reduzieren und auch in Zukunft gering zu halten.
Diese Themen werden behandelt
- Reduzierung der Lizenzkosten durch Auffinden und Beheben von Fehlkonfigurationen und überflüssigen Konten
- Wie funktionieren CCB- und CCX-Lizenzen wirklich?
- Verstehen des DLAU-Tools und wie man es am besten nutzt
- Tipps für häufige Problembereiche, wie z. B. Team-Postfächer, Funktions-/Testbenutzer usw.
- Praxisbeispiele und Best Practices zum sofortigen Umsetzen
UiPath Test Automation using UiPath Test Suite series, part 6DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 6. In this session, we will cover Test Automation with generative AI and Open AI.
UiPath Test Automation with generative AI and Open AI webinar offers an in-depth exploration of leveraging cutting-edge technologies for test automation within the UiPath platform. Attendees will delve into the integration of generative AI, a test automation solution, with Open AI advanced natural language processing capabilities.
Throughout the session, participants will discover how this synergy empowers testers to automate repetitive tasks, enhance testing accuracy, and expedite the software testing life cycle. Topics covered include the seamless integration process, practical use cases, and the benefits of harnessing AI-driven automation for UiPath testing initiatives. By attending this webinar, testers, and automation professionals can gain valuable insights into harnessing the power of AI to optimize their test automation workflows within the UiPath ecosystem, ultimately driving efficiency and quality in software development processes.
What will you get from this session?
1. Insights into integrating generative AI.
2. Understanding how this integration enhances test automation within the UiPath platform
3. Practical demonstrations
4. Exploration of real-world use cases illustrating the benefits of AI-driven test automation for UiPath
Topics covered:
What is generative AI
Test Automation with generative AI and Open AI.
UiPath integration with generative AI
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfMalak Abu Hammad
Discover how MongoDB Atlas and vector search technology can revolutionize your application's search capabilities. This comprehensive presentation covers:
* What is Vector Search?
* Importance and benefits of vector search
* Practical use cases across various industries
* Step-by-step implementation guide
* Live demos with code snippets
* Enhancing LLM capabilities with vector search
* Best practices and optimization strategies
Perfect for developers, AI enthusiasts, and tech leaders. Learn how to leverage MongoDB Atlas to deliver highly relevant, context-aware search results, transforming your data retrieval process. Stay ahead in tech innovation and maximize the potential of your applications.
#MongoDB #VectorSearch #AI #SemanticSearch #TechInnovation #DataScience #LLM #MachineLearning #SearchTechnology
Your One-Stop Shop for Python Success: Top 10 US Python Development Providersakankshawande
Simplify your search for a reliable Python development partner! This list presents the top 10 trusted US providers offering comprehensive Python development services, ensuring your project's success from conception to completion.
Infrastructure Challenges in Scaling RAG with Custom AI modelsZilliz
Building Retrieval-Augmented Generation (RAG) systems with open-source and custom AI models is a complex task. This talk explores the challenges in productionizing RAG systems, including retrieval performance, response synthesis, and evaluation. We’ll discuss how to leverage open-source models like text embeddings, language models, and custom fine-tuned models to enhance RAG performance. Additionally, we’ll cover how BentoML can help orchestrate and scale these AI components efficiently, ensuring seamless deployment and management of RAG systems in the cloud.
OpenID AuthZEN Interop Read Out - AuthorizationDavid Brossard
During Identiverse 2024 and EIC 2024, members of the OpenID AuthZEN WG got together and demoed their authorization endpoints conforming to the AuthZEN API
Building Production Ready Search Pipelines with Spark and MilvusZilliz
Spark is the widely used ETL tool for processing, indexing and ingesting data to serving stack for search. Milvus is the production-ready open-source vector database. In this talk we will show how to use Spark to process unstructured data to extract vector representations, and push the vectors to Milvus vector database for search serving.
HCL Notes and Domino License Cost Reduction in the World of DLAUpanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-notes-and-domino-license-cost-reduction-in-the-world-of-dlau/
The introduction of DLAU and the CCB & CCX licensing model caused quite a stir in the HCL community. As a Notes and Domino customer, you may have faced challenges with unexpected user counts and license costs. You probably have questions on how this new licensing approach works and how to benefit from it. Most importantly, you likely have budget constraints and want to save money where possible. Don’t worry, we can help with all of this!
We’ll show you how to fix common misconfigurations that cause higher-than-expected user counts, and how to identify accounts which you can deactivate to save money. There are also frequent patterns that can cause unnecessary cost, like using a person document instead of a mail-in for shared mailboxes. We’ll provide examples and solutions for those as well. And naturally we’ll explain the new licensing model.
Join HCL Ambassador Marc Thomas in this webinar with a special guest appearance from Franz Walder. It will give you the tools and know-how to stay on top of what is going on with Domino licensing. You will be able lower your cost through an optimized configuration and keep it low going forward.
These topics will be covered
- Reducing license cost by finding and fixing misconfigurations and superfluous accounts
- How do CCB and CCX licenses really work?
- Understanding the DLAU tool and how to best utilize it
- Tips for common problem areas, like team mailboxes, functional/test users, etc
- Practical examples and best practices to implement right away
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdfTechgropse Pvt.Ltd.
In this blog post, we'll delve into the intersection of AI and app development in Saudi Arabia, focusing on the food delivery sector. We'll explore how AI is revolutionizing the way Saudi consumers order food, how restaurants manage their operations, and how delivery partners navigate the bustling streets of cities like Riyadh, Jeddah, and Dammam. Through real-world case studies, we'll showcase how leading Saudi food delivery apps are leveraging AI to redefine convenience, personalization, and efficiency.
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
For the full video of this presentation, please visit: https://www.edge-ai-vision.com/2024/06/building-and-scaling-ai-applications-with-the-nx-ai-manager-a-presentation-from-network-optix/
Robin van Emden, Senior Director of Data Science at Network Optix, presents the “Building and Scaling AI Applications with the Nx AI Manager,” tutorial at the May 2024 Embedded Vision Summit.
In this presentation, van Emden covers the basics of scaling edge AI solutions using the Nx tool kit. He emphasizes the process of developing AI models and deploying them globally. He also showcases the conversion of AI models and the creation of effective edge AI pipelines, with a focus on pre-processing, model conversion, selecting the appropriate inference engine for the target hardware and post-processing.
van Emden shows how Nx can simplify the developer’s life and facilitate a rapid transition from concept to production-ready applications.He provides valuable insights into developing scalable and efficient edge AI solutions, with a strong focus on practical implementation.
Driving Business Innovation: Latest Generative AI Advancements & Success StorySafe Software
Are you ready to revolutionize how you handle data? Join us for a webinar where we’ll bring you up to speed with the latest advancements in Generative AI technology and discover how leveraging FME with tools from giants like Google Gemini, Amazon, and Microsoft OpenAI can supercharge your workflow efficiency.
During the hour, we’ll take you through:
Guest Speaker Segment with Hannah Barrington: Dive into the world of dynamic real estate marketing with Hannah, the Marketing Manager at Workspace Group. Hear firsthand how their team generates engaging descriptions for thousands of office units by integrating diverse data sources—from PDF floorplans to web pages—using FME transformers, like OpenAIVisionConnector and AnthropicVisionConnector. This use case will show you how GenAI can streamline content creation for marketing across the board.
Ollama Use Case: Learn how Scenario Specialist Dmitri Bagh has utilized Ollama within FME to input data, create custom models, and enhance security protocols. This segment will include demos to illustrate the full capabilities of FME in AI-driven processes.
Custom AI Models: Discover how to leverage FME to build personalized AI models using your data. Whether it’s populating a model with local data for added security or integrating public AI tools, find out how FME facilitates a versatile and secure approach to AI.
We’ll wrap up with a live Q&A session where you can engage with our experts on your specific use cases, and learn more about optimizing your data workflows with AI.
This webinar is ideal for professionals seeking to harness the power of AI within their data management systems while ensuring high levels of customization and security. Whether you're a novice or an expert, gain actionable insights and strategies to elevate your data processes. Join us to see how FME and AI can revolutionize how you work with data!
Full-RAG: A modern architecture for hyper-personalizationZilliz
Mike Del Balso, CEO & Co-Founder at Tecton, presents "Full RAG," a novel approach to AI recommendation systems, aiming to push beyond the limitations of traditional models through a deep integration of contextual insights and real-time data, leveraging the Retrieval-Augmented Generation architecture. This talk will outline Full RAG's potential to significantly enhance personalization, address engineering challenges such as data management and model training, and introduce data enrichment with reranking as a key solution. Attendees will gain crucial insights into the importance of hyperpersonalization in AI, the capabilities of Full RAG for advanced personalization, and strategies for managing complex data integrations for deploying cutting-edge AI solutions.
“An Outlook of the Ongoing and Future Relationship between Blockchain Technologies and Process-aware Information Systems.” Invited talk at the joint workshop on Blockchain for Information Systems (BC4IS) and Blockchain for Trusted Data Sharing (B4TDS), co-located with with the 36th International Conference on Advanced Information Systems Engineering (CAiSE), 3 June 2024, Limassol, Cyprus.
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc
How does your privacy program stack up against your peers? What challenges are privacy teams tackling and prioritizing in 2024?
In the fifth annual Global Privacy Benchmarks Survey, we asked over 1,800 global privacy professionals and business executives to share their perspectives on the current state of privacy inside and outside of their organizations. This year’s report focused on emerging areas of importance for privacy and compliance professionals, including considerations and implications of Artificial Intelligence (AI) technologies, building brand trust, and different approaches for achieving higher privacy competence scores.
See how organizational priorities and strategic approaches to data security and privacy are evolving around the globe.
This webinar will review:
- The top 10 privacy insights from the fifth annual Global Privacy Benchmarks Survey
- The top challenges for privacy leaders, practitioners, and organizations in 2024
- Key themes to consider in developing and maintaining your privacy program
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxSitimaJohn
Ocean Lotus cyber threat actors represent a sophisticated, persistent, and politically motivated group that poses a significant risk to organizations and individuals in the Southeast Asian region. Their continuous evolution and adaptability underscore the need for robust cybersecurity measures and international cooperation to identify and mitigate the threats posed by such advanced persistent threat groups.
2. 2
Noi dung
Luông nhap xuât là gì?
Các loi luông
Phân câp lp luông
Dùng Stream e iêu khien luông nhap xuât.
Byte streams
Character streams
Buffered streams
Standard I/O streams
Data streams
Object streams
Lp File
3. 3
Khái niem luông?
Luông là mot “dòng ch
y” ca d
4. lieu ưc gan vi
các thiêt b vào ra.
Hai loi luông:
Luông nhap: Gan vi các thiêt b nhap như bàn phím, máy
scan, file...
Luông xuât: Gan vi các thiêt b xuât như màn hình, máy
in, file...
Viec x lý vào ra thông qua luông giúp cho lap trình
viên không ph
i quan tâm ên b
n chât ca thiêt b
vào ra.
19. ng lp gôc ca tât c
các output stream:
Lp OutputStream
Lp Writer
20. 9
Node and Filter Streams
Node streams (Data sink stream)
Cha nh
21. ng chc nang cơ b
n cho viec c và ghi t mot
v trí xác nh.
Các loi node stream bao gôm file, bo nh và pipe
Filter streams (Processing stream)
Luông lc có kh
nang kêt nôi vi các luông khác và x lý
d
22. lieu “theo cách riêng” ca nó.
FilterInputStream và FilterOutputStream là 2 lp luông lc
cơ b
n.
26. 13
InputStream Abstract Class
public abstract int read() throws IOException
c mot byte kê tiêp ca d
27. lieu t luông.
public int read(byte[] bBuf) throws IOException
c mot sô byte d
28. lieu t luông và lưu vào m
ng byte bBuf.
public int read(byte[] cBuf, int offset, int length) throws IOException
c length byte d
29. lieu t luông và lưu vào m
ng byte cBuf bat âu ti v
trí offset.
public void close() throws IOException
óng nguôn. Gi nh
30. ng phương thc khác sau khi ó nguôn se gây ra loi
IOException
public int mark(int readAheadLimit) throws IOException
ánh dâu v trí hien hành ca stream. Sau khi ánh dâu, gi reset() se
nh li v trí ca luông ên iem này. Không ph
i tât c
luông byte –input ho
tr cho thao tác này.
public int markSupported()
Ch ra luông có ho tr thao tác mark và reset hay không
31. 14
Node InputStream Classes
FileInputStream
c các byte t file
ByteArrayInputStream
Thc thi mot buffer mà nó cha các byte, mà nó có the
ưc c t nguôn.
PipedInputStream
Nên ưc liên kêt vi PipedOutputStream. Nh
32. ng
luông này ưc s dng b#i 2 luông. Trong ó mot cái là
c d
34. ng cái khác thì ghi
xuông PipedOutputStream tương ng.
35. 15
Filter InputStream Classes
BufferedInputStream
Mot class con ca FilterInputStream cho phép at vùng em cho input e
c các byte d
36. lieu mot cách hieu qu
.
FilterInputStream
For reading filtered byte streams, which may transform the basic source data
along the way and provide additional functionalities.
ObjectInputStream
Used for object serialization. Deserializes objects and previuosly written
using an ObjectOutputStream.
DataInputStream
A subclass of FilterInputStream that lets an application read Java primitive
data from underlying inputstream in a machine-independent way.
LineNumberInputStream
A subclass of FilterInputStream that allows tracking of the current line
number.
PushbackInputStream
A subclass of FilterInputStream class that allows bytes to be pushed back or
unread into the stream
37. 16
Lp tru tng OutputStream
public void write(int b) throws IOException
Ghi giá tr b xác nh theo dng byte xuông output stream
public void write(byte[] b) throws IOException
Lưu noi dung ca m
ng byte b xuông luông
public void write(byte[] b, int off, int len) throws
IOException
Lưu len byte ca m
ng byte b xuông luông, bat âu t v trí off ca m
ng
public void close() throws IOException
óng nguôn. Gi nh
38. ng phương thc khác liên quan ên nguôn này sau khi gi
close se gây ra loi IOException.
public void flush() throws IOException
flushes the stream.(ví d: Nh
39. ng byte ưc lưu trong buffer ngay lap tc ưc
ghi xuông ích)
40. 17
Node OutputStream Classes
FileOuputStream
For writing bytes to a file
ByteArrayOutputStream
Implements a buffer that contains bytes, which may be
written to the stream
PipedOutputStream
Should be connected to a PipedInputStream. These
streams are typically used by two threads wherein one of
these threads writes data to this stream while the other
thread reads from the corresponding PipeInputStream.
41. 18
Filter OutputStream Classes
BufferedOutputStream
A subclass of FilterOutputStream that allows buffering of output in order to
provide for the efficient writing of bytes. Allows writing of bytes to the
underlying output stream without necessarily causing a call to underlying
system for each byte written.
FilterOutputStream
For writing filtered byte streams, which may transform the basic source of
data along the way and provide additional functionalities.
ObjectOutputStream
Used for object serialization. Serializes object and primitve data to
OuputStream.
DataOutputStream
A subclass of FilterOutputStream that lets an application write Java primitive
data to underlying output stream in machine-independent way.
PrintStream
A subclass of FilteOutputStream that provides capability for printing
representations of various data values conveniently.
42. 19
The Reader Class: Methods
public int read() throws IOException
c mot ký t
public int read(char[] cbuf) throws IOException
c nh
43. ng ký t và lưu chúng vào m
ng cbuf
public abstract int read(char[] cbuf, int off, int len) throws
IOException
c len ký t và lưu chúng vào tron m
ng cbuf, bat âu ti v trí off ca m
ng
public abstract void close() throws IOException
óng luông. Gi nh
44. ng phương thc Reader khác ca sau khi gi close se gây ra loi IOException
public void mark(int readAheadLimit) throws IOException
ánh dâu v trí hien hành ca stream. Sau khi ánh dâu, gi reset() e th at li v trí luông ti
iem này. Không ph
i tât c
character-input êu ho tr thao tác này
public boolean markSupported()
Ch ra luông có ho tr thao tác này hay không. Mac nh là không ho tr.
public void reset() throws IOException
at li v trí luông ti v trí ánh dâu lân cuôi
45. 20
Node Reader Classes
FileReader
Cho viec c t file
CharArrayReader
Thc thi mot vùng em ký t có the ưc c
StringReader
Cho viec c t nguôn string
PipedReader
Dùng theo cap (tương ng vi PipedWriter) bang
2 luông mà chúng có the liên lc vi nhau.Mot
trong nh
47. 21
Filter Reader Classes
BufferedReader
Allows buffering of characters in order to provide for efficient reading
of characters, arrays, and lines
FilterReader
For reading filtered character streams
InputStreamReader
Converts read bytes to characters
LineNumberReader
A subclass of BufferedReader class that able to keep track of line
numbers.
PushbackReader
A subclass of the FilterReader class that allows character to pushed
back or unread into the stream.
48. 22
The Writer Class: Methods
public void write(int c) throws IOException
Ghi mot ký t ơn ưc the hien bang sô nguyên. Ví d: ‘A’ là ưc ghi la
write(65)
public void write(char[] cbuf) throws IOException
Ghi noi dung ca m
ng ký t cbuf xuông luông
public abstract void write(char[] cbuf, int off, int len)
throws IOException
Ghi mot m
ng ký t cbuf vi chiêu dài là len, bat âu là v trí off
public void write(String str) throws IOException
Ghi mot chuoi str
public void write(String str, int off, int len) throws
IOException
Ghi mot chuoi str vi chiêu dài là len, bat âu t v trí off
public abstract void flush() throws IOException
ay d
49. lieu xuông ích ên.
public abstract void close() throws IOException
óng luông.
50. 23
Node Writer Classes
FileWriter
For writing to character to file
CharArrayWriter
Implements a character buffer that can be written to
StringWriter
For writing to a string source
PipedWriter
Used in pairs(with corresponding with PipedReader) by two
threads that want to communicate. One of these threads
writes characters to this stream.
51. 24
Filter Writer Classes
BufferedWriter
Allows buffering of characters in order to provide for the
efficient writing of characters, arrays, and lines.
FilterWriter
For writing filtered character streams.
OutputStreamWriter
Encodes characters written to it into bytes.
PrintWriter
Prints formatted representations of objects to a text-output
stream.
52. 25
iêu khien luông nhap xuât(I/O)
To ôi tưng luông và liên kêt nó vi d
53. lieu
nguôn(data-destination)
ưa ra ôi tưng luông vi chc nang mong
muôn thông qua chuoi luông (Give the
stream object the desired functionality
through stream chaining)
óng luông
54. 26
Byte Stream
Chương trình s dng luông byte e thc
hien nhap xuât nh
55. ng byte 8-bit
Tât c
cá lp luông byte ưc kê tha t
InputStream và OutputStream
Có nhiêu lp luông byte
FileInputStream và FileOutputStream
Chúng ưc s dng trong cùng mot cách;
chúng khác nhau ch yêu là cách thc chúng
ưc kh#i to.
63. lieu phc
tp
Byte Stream ch nên s dng cho hâu hêt
nh
64. ng nhap xuât nguyên thy
Tât c
các stream khác êu ưc da trên
byte stream
65. 28
Example: FileInputStream
FileOutputStream
import java.io.*;
public class CopyBytes {
public static void main(String[] args) throws IOException {
FileInputStream in = null;
FileOutputStream out = null;
try {
in = new FileInputStream(“d:/src.txt);
out = new FileOutputStream(“d:/dst.txt);
int c;
while ((c = in.read()) != -1) { out.write(c); }
}
finally {
if (in != null) { in.close(); }
if (out != null) { out.close(); }
}
}
}
66. 29
Simple Byte Stream input and
output
InputStream
H e l l o Y o u
b = read()
write(b)
Y
H e l l o Y
OutputStream
69. ng giá tr ký t theo
dng Unicode
Tât c
các lp character stream ưc kê tha
t Reader và Writer
Có các lp character stream : FileReader và
FileWriter.
70. 31
Example: FileReader
FileWriter
public class CopyCharacters {
public static void main(String[] args) throws IOException {
FileReader inputStream = null;
FileWriter outputStream = null;
try {
inputStream = new FileReader(“d:/fileIn.txt);
outputStream = new FileWriter(“d:/fileOut.txt);
int c;
while ((c = inputStream.read()) != -1) { outputStream.write(c);}
}
finally {
if (inputStream != null) { inputStream.close(); }
if (outputStream != null) { outputStream.close(); }
}
}
}
71. 32
Character Stream và Byte Stream
Character stream thưng là wrappers“ cho
byte stream
Character stream s dng byte stream thc
hien nhap xuât vat lý, trong khi character
stream x lý chuyen oi gi
72. a character và
byte
Chang hn FileReader dùng như
FileInputStream, trong khi FileWriter dùng như
FileOutputStream
73. 33
Buffered Streams
Mot I/O không có bo em có nghia là moi yêu câu
c hoac ghi ưc x lý trc tiêp b#i OS
iêu này làm chương trình kém hieu qu
, vì moi yêu câu
thưng ph
i truy xuât ia, hot ong mng, hoac mot và
thao tác khá mà nó tương ôi tôn thi gian.
e gi
m công viec loi này, Java platform thc thi
luông I/O có bo em
Buffered input stream c d
74. lieu t vùng nh như là bo
em; API input ưc gi ch khi bo em rong.
Tương t, buffered output stream ghi d
75. lieu xuông bo
em, và API output ch ưc gi khi buffer ây.
76. 34
To Buffered Stream?
Mot chương trình có the chuyen mot stream
không có bo em thành stream có bo em
bang cách s dng v) bao.
Mot unbuffered stream object ưc chuyen qua
hàm dng cho mot lp stream có bo em
Ví d:
inputStream = new BufferedReader(new
FileReader(characterinput.txt));
outputStream = new BufferedWriter(new
FileWriter(characteroutput.txt));
77. 35
Buffered Stream Classes
BufferedInputStream và
BufferedOutputStream to ra byte
stream có bo em
BufferedReader và BufferedWriter to
ra character stream có bo em
78. 36
Standard Streams on Java
Platform
Có 3 standard stream
Input: System.in
Output: System.out
Error: System.err
Nh
79. ng ôi tưng này ưc nh nghia t
ong và không cân thiêt ưc m#.
System.out and System.err ưc nh nghia
như là nh
81. 37
Data Streams
Data stream ho tr nhap xuât nh phân ca các loi
d
82. lieu nguyên thu* (boolean, char, byte, short, int,
long, float, and double) cung như là String
Tât c
data stream thc thi c
DataInput cung
nh DataOutput interface
DataInputStream and DataOutputStream thc
thi nh
85. 38
DataOutputStream
DataOutputStream có the ch ưc to như là mo
v) bc cho ôi tưng byte stream
out = new DataOutputStream(
new BufferedOutputStream(
new FileOutputStream(dataFile)));
for (int i = 0; i prices.length; i ++) {
out.writeDouble(prices[i]);
out.writeInt(units[i]);
out.writeUTF(descs[i]);
}
86. 39
DataInputStream
Giông như DataOutputStream, DataInputStream ph
i ưc xây
dng như là mot v) bc cho ôi tưng byte stream
iêu kien End-of-file ưc dò b#i biet le EOFException, thay vì
kiem tra e tr
vê giá tr hêt file.
in = new DataInputStream(new BufferedInputStream(
new FileInputStream(dataFile)));
try{
double price = in.readDouble();
int unit = in.readInt();
String desc = in.readUTF();
} catch (EOFException e){
}
87. 40
Object Streams
Object streams support I/O of objects
Like Data streams support I/O of primitive data types
The object has to be Serializable type
The object stream classes are ObjectInputStream
and ObjectOutputStream
These classes implement ObjectInput and ObjectOutput,
which are subinterfaces of DataInput and DataOutput
An object stream can contain a mixture of primitive and
object values
88. 41
Input and Output of Complex
Object
The writeObject and readObject methods are simple
to use, but they contain some very sophisticated
object management logic
This isn't important for a class like Calendar, which just
encapsulates primitive values. But many objects contain
references to other objects.
If readObject is to reconstitute an object from a
stream, it has to be able to reconstitute all of the
objects the original object referred to.
These additional objects might have their own references,
and so on.
89. 42
WriteObject
The writeObject traverses the entire web of
object references and writes all objects in that
web onto the stream
A single invocation of writeObject can cause
a large number of objects to be written to the
stream.
90. 43
I/O of multiple referred-to objects
Object a contains references to objects b and
c, while b contains references to d and e
91. 44
I/O of multiple referred-to objects
Invoking writeObject(a) writes not just a, but
all the objects necessary to reconstitute a, so
the other four objects in this web are written
also
When a is read back by readObject, the other
four objects are read back as well, and all the
original object references are preserved.
92. 45
Always Close Streams
Closing a stream when it's no longer needed
is very important — so important that your
program should use a finally block to
guarantee that both streams will be closed
even if an error occurs
This practice helps avoid serious resource leaks.
93. 46
The File Class
Not a stream class
Important since stream classes manipulate
File objects
Abstract representation of actual files and
directory pathname
94. 47
The File Class: Constructor
Methods
public File(String pathname)
public String getName()
public boolean exists()
public long length()
public long lastModified()
public boolean canRead()
public boolean canWrite()
public boolean isFile()
public boolean isDirectory()
public String[] list()
public boolean mkdir()
public boolean delete()
95. 48
The File Class: Example
import java.io.*;
public class FileInfoClass {
public static void main(String args[]) {
String fileName = args[0];
File fn = new File(fileName);
System.out.println(Name: + fn.getName());
if (!fn.exists()) {
System.out.println(fileName + does not exists.);
/* Create a temporary directory instead. */
System.out.println(Creating temp directory...);
fileName = temp;
fn = new File(fileName);
fn.mkdir();
System.out.println(fileName + (fn.exists()? exists:
does not exist));
System.out.println(Deleting temp directory...);
fn.delete();
}
96. 49
The File Class: Example
System.out.println(fileName + is a + (fn.isFile()? file.
:directory.));
if (fn.isDirectory()) {
String content[] = fn.list();
System.out.println(The content of this directory:);
for (int i = 0; i content.length; i++)
System.out.println(content[i]);
}
if (!fn.canRead()) {
System.out.println(fileName + is not readable.);
return;
}
System.out.println(fileName + is + fn.length() + bytes long.);
System.out.println(fileName + is + fn.lastModified()
+ bytes long.);
if (!fn.canWrite()) {
System.out.println(fileName + is not writable.);
}
}
}