IB103 Week 10 Files CHAPTER 19. Files RAM vs. Files of CD or HD Fasterslower Costs morecheaper Temporarypermanent Stores whilecopied to RAM to Executingexecute.

Slides:



Advertisements
Similar presentations
Computer Basics 2.
Advertisements

Basic Computer Vocabulary
Buffers & Spoolers J L Martin Think about it… All I/O is relatively slow. For most of us, input by typing is painfully slow. From the CPUs point.
Java Applets:. How Applets differ from application?: They do not use main method but init(), start() and paint() methods of the applet class They can.
 We can use a combination of the File and FileOutputStream to write a series of bytes to a file.
Intro Test 2 – Chapters 3,4 & Word Sample Questions SPRING 2005.
1 Fall 2008ACS-1903 Chapter 1 Topics Java History Java Programs Why Program? Computer Systems: Hardware and Software Programming Languages What Is a Program.
Chapter 1. What is computer fluency? The knowledge possessed by people who are able to navigate the digital world successfully NOT THIS.
Computer Hardware.
Applets. What is an Applet?  According to Sun “An applet is a small program that is intended not to be run on its own, but rather to be embedded inside.
Lecture 30 Streams and File I/O COMP1681 / SE15 Introduction to Programming.
Chapter 9 Security Malware Defenses. Malware Can be used for a form of blackmail. Example: Encrypts files on victim disk, then displays message.
1 DOS with Windows 3.1 and 3.11 Operating Environments n Designed to allow applications to have a graphical interface DOS runs in the background as the.
Starting Out with C++: Early Objects 5/e © 2006 Pearson Education. All Rights Reserved Starting Out with C++: Early Objects 5 th Edition Chapter 1 Introduction.
CS 0008 Day 2 1. Today Hardware and Software How computers store data How a program works Operators, types, input Print function Running the debugger.
The Operating System The operation system (OS) is a set of programs that coordinates: Hardware functions Interaction between application software and computer.
Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 1 Introduction to Computers and Programming.
Chapter 1: An Introduction to Computers and Programming Prelude to Programming Concepts and Design Copyright © 2001 Scott/Jones, Inc.. All rights reserved.
Why Program? Computer – programmable machine designed to follow instructions Program – instructions in computer memory to make it do something Programmer.
TERMS TO KNOW. Programming Language A vocabulary and set of grammatical rules for instructing a computer to perform specific tasks. Each language has.
An Introduction to Hardware, Software, and the Internet
CSC 125 Introduction to C++ Programming Chapter 1 Introduction to Computers and Programming.
Introduction to Java CSIS 3701: Advanced Object Oriented Programming.
© Paradigm Publishing Inc. 4-1 Chapter 4 System Software.
DOS Understanding what you can do. Operating System Traits An OS only works with one type of processor –X86 processors for us; Motorola for Mac –Must.
Today’s Agenda: Computer Basics Review Hardware: The physical components of a computer, any internal or external computer part that you can touch. Software:
Chapter 4 System Software.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
RjpSystem Level Programming Operating Systems 1 Having fun withy the Unix Operating System Praxis Week 7 Rob Pooley.
Windows XP Basics By Jane Maringer-Cantu CSIS 572.
1 Introduction to Computers Lect 1 Won’t tell you much you don’t know. (Misleading– the course gets more conceptual as we create webpages.) Will go into.
Introduction to Java CSIS 3701: Advanced Object Oriented Programming.
Computer Parts. Two Basic Parts Hardware & Software.
Intro to Computers Computer Apps 1.
Section 2 Section 2.1 Identify hardware Describe processing components Compare and contrast input and output devices Compare and contrast storage devices.
Chapter 18 Networking F Client/Server Communications F Simple Client/Server Applications F Serve Multiple Clients F Create Applet Clients F Send and Retrieve.
© 2012 Pearson Education, Inc. All rights reserved. 1-1 Why Java? Needed program portability – Program written in a language that would run on various.
File I/O Static void Main( ) {... } data. Topics I/O Streams Reading and Writing Text Files Formatting Text Files Handling Stream Errors File Pointers.
The Joy of Programming (also known as) Introduction to Object-Oriented Programming.
Chapter 9 1 Chapter 9 – Part 1 l Overview of Streams and File I/O l Text File I/O l Binary File I/O l File Objects and File Names Streams and File I/O.
Mrs. Ulshafer August, 2013 Java Programming Chapter 1.
© Paradigm Publishing Inc. 4-1 OPERATING SYSTEMS.
Lecture 8 February 29, Topics Questions about Exercise 4, due Thursday? Object Based Programming (Chapter 8) –Basic Principles –Methods –Fields.
By Rachel Thompson and Michael Deck.  Java.io- a package for input and output  File I/O  Reads data into and out of the console  Writes and reads.
Texas Forty-Two By: Nate Normandin CS 470. What is Texas Forty-Two? A Domino Game A way for people to learn the game A way for people to play others A.
Computer Science Web quest. Input devices Input devices are used to give the computer information so it does what the operator wants it to do. There are.
Chapter 16: Networking F Client/Server Communications F Serving Multiple Clients F Applet Clients F Viewing HTML Pages F Retrieving Files from Web Servers.
Lecture 19 Serialization Richard Gesick. Serialization Sometimes it is easier to read or write entire objects than to read and write individual fields.
Introduction to Java Files. Text Files A sequential collection of data stored on a permanent storage device Hard drive USB memory CD/DVD Has a name and.
Computer Literacy for IC 3 Unit 1: Computing Fundamentals © 2010 Pearson Education, Inc. | Publishing as Prentice Hall.1 Chapter 4: Identifying Software.
© Paradigm Publishing, Inc. 4-1 Chapter 4 System Software Chapter 4 System Software.
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
Problem Solving Techniques Using Pascal Allen C.-H. Wu Department of Computer Science Tsing Hua University Hsinchu, Taiwan 30043, ROC
Applets, Images, and Audio Chapter 14 CSCI CSCI 1302 – Applets, Images, and Audio2 Outline Introduction The Applet Class –The init Method –The start.
© 2012 Pearson Education, Inc. All rights reserved types of Java programs Application – Stand-alone program (run without a web browser) – Relaxed.
Files and console applications Chapter 17 This chapter explains: What a file is How to read and write to files How to manipulate folder paths and file.
Unit 1 Chapter 3 : Hardware.
Introduction To Computers
Systems Software. Systems software Applications software such as word processing, spreadsheet or graphics packages Operating systems software to control.
111 State Management Beginning ASP.NET in C# and VB Chapter 4 Pages
**Input devices** 1- you communicate with the computer via an input device. 2- Input devices allow us to send information to the CPU to tell the computer.
Computer Basics.
Computer and Internet Basics
Nat 4/5 Computing Science Software
Tutorial 10 Programming with JavaScript
Applets.
Operating Systems Chapter 5: Input/Output Management
Introduction to Java Brief history of Java Sample Java Program
Understanding input, output and storage devices
Presentation transcript:

IB103 Week 10 Files CHAPTER 19

Files RAM vs. Files of CD or HD Fasterslower Costs morecheaper Temporarypermanent Stores whilecopied to RAM to Executingexecute Size 32, to 128, 256…floppy 1.4M CD 650 MB, HD Billions Bytes

Files security and Applets Downloaded from a web page run via java enabled browser or appletviewer on users PC. (security rules for applets in Java – very strict, examples can not read, write to local files only communicate with original server etc. by default

Streams – bytes continuous Essentials of streams: (In) 1. Open file 2. Read data into variables 3. Close file (Out) 1. Open file 2. Output/write items in required sequence 3. Close file

Buffer – a “chunk” of memory “Spoon fed” to a device, like a printer that is much slower that CPU. The CPU can is then free to run full speed until another buffer full is needed by the device

File example in text “FileDemo1” File input See “FileDemo1” File Search See “FileSearch” – seeks a string within the file “FileDialog” “gets” a file, uses a window with a “load” button

FileDemo1 try{ outFile = new PrintWriter( new FileWriter("testout.txt"), true); outFile.print(inputTextArea.getText() ); outFile.close(); }

FileDemo1 part 2 catch (IOException e) { System.err.println("File Error: " + e.toString() ); System.exit(1); }

The System Class.in,.out,.err (input/output/error) Command Line Input/ Output Java Console