Principles, Models, and Applications for Distributed Systems M

Size: px
Start display at page:

Download "Principles, Models, and Applications for Distributed Systems M"

Transcription

1 Università degli Studi di Bologna Facoltà di Ingegneria Principles, Models, and Applications for Distributed Systems M Input-Output, Stream, File Jacopo De Benedetto Stream A stream is a virtually unlimited sequence of elements. Input-Output in Java is done using streams. 1

2 BYTE STREAMS Programs use byte streams to perform input and output of bytes. All byte stream classes are descended from java.io.inputstream and java.io.outputstream. NOTE: InputStream and OutputStream are abstract classes, so cannot be instantiated! InputStream METHODS abstract int read() Reads the next byte of data from the input stream int read(byte[] b) Reads some number of bytes from the input stream and stores them into the buffer array b void close() Closes this input stream and releases any system resources associated with the stream see documentation 2

3 OutputStream METHODS abstract void write(int b) Writes the specified byte to this output stream. void write(byte[] b) Reads some number of bytes from the input stream and stores them into the buffer array b void close() Closes this output stream and releases any system resources associated with the stream see documentation CHARACTER STREAMS All character stream classes are descended from java.io.reader and java.io.writer. The Java platform stores character values using Unicode conventions. Character stream I/O automatically translates this internal format to and from the local character set. 3

4 Reader METHODS int read() Reads a single character int read(char[] cbuf) Reads characters into the array cbuf void close() Closes the stream and releases any system resources associated with the stream see documentation I/O FROM COMMAND LINE Standard Streams are a feature of many operating systems. By default, they read input from the keyboard and write output to the display. The Java platform supports three Standard Streams: Standard Input, accessed through System.in; Standard Output, accessed through System.out; Standard Error, accessed through System.err. These stream objects are defined automatically and do not need to be opened. 4

5 STANDARD STREAMS Standard Streams are a feature of many operating systems. By default, they read input from the keyboard and write output to the display. The Java platform supports three Standard Streams: Standard Input, accessed through System.in; Standard Output, accessed through System.out; Standard Error, accessed through System.err. These stream objects are defined automatically and do not need to be opened and closed. READ FROM STANDARD INPUT Sytem.in is an input stream. It s an object of type InputStream, a byte-based strem. int byte = System.in.read(); To use a character-based stream, is possible to wrap the InputStream object inside a InputStreamReader object: InputStreamReader cin = new InputSreamReader(System.in); 5

6 WRITE TO THE STANDARD INPUT System.out and System.err are output stream. They are both objects of type PrintStream, a byte stream derived from OutputStream that can write not only bytes but also other objects (numbers, string, etc..) System.out.print(5); System.out.print("hello"); System.out.println("hello"); is the same as: System.out.print("hello\n"); BUFFERED STREAMS Unbuffered I/O can make a program much less efficient, since each such request often triggers disk access, network activity, or some other operation that is relatively expensive. Java platform implements buffered I/O streams. Buffered input streams read data from a memory area known as a buffer; the native input API is called only when the buffer is empty. Similarly, buffered output streams write data to a buffer, and the native output API is called only when the buffer is full. 6

7 BUFFERED STREAMS Byte-based stream classes: BufferedInputStream (subclass of InputStream) BufferedOutputStream (subclass of OutputStream) Character-based stream classes: BufferedReader (subclass of Reader) BufferedWriter (subclass of Writer) WRAPPING A STREAM A program can convert an unbuffered stream into a buffered stream by wrapping it, passing the unbuffered stream object to the constructor of a buffered stream class. For example, InputStreamReader and OutputStreamReader are subclasses of classes Reader and Writer and their constructor accepts respectively an InputStream and an OutputStream. 7

8 DATA STREAM Data streams support binary I/O of primitive data type values (boolean, char, byte, short, int, long, float, and double) as well as String values. All data streams implement either the DataInput interface or the DataOutput interface. The most widely-used implementations of these interfaces are DataInputStream and DataOutputStream. FILES AND DIRECTORIES java.io.file class represents the files and directory pathnames. It can be used to work with files and directories (create, search, delete, etc..). Constructor: File(String pathname); Methods: boolean exists(); boolean isdirectory(); boolean isfile(); String[] list(); File[] listfiles(); 8

9 FILES I/O Is possible to interact with files using streams. Byte-based stream classes: FileInputStream (subclass of InputStream) FileOutputStream (subclass of OutputStream) Character-based stream classes: FileReader (subclass of Reader) FileWriter (subclass of Writer) File f = ; READ A FILE FileReader fr = new FileReader(f); BufferedReader br = new BufferedReader(fr); String line; while ((line=br.readline())!= null) { System.out.println(line); } br.close(); fr.close(); 9

10 WRITE A FILE File f = ; FileWriter fw = new FileWriter(f); BufferedWriter bw = new BufferedWriter(fw); String line = ; fw.write(line); String anotherline = ; fw.write(anotherline); bw.flush(); bw.close(); fw.close(); 10

INPUT AND OUTPUT STREAMS

INPUT AND OUTPUT STREAMS INPUT AND OUTPUT The Java Platform supports different kinds of information sources and information sinks. A program may get data from an information source which may be a file on disk, a network connection,

More information

READING DATA FROM KEYBOARD USING DATAINPUTSTREAM, BUFFEREDREADER AND SCANNER

READING DATA FROM KEYBOARD USING DATAINPUTSTREAM, BUFFEREDREADER AND SCANNER READING DATA FROM KEYBOARD USING DATAINPUTSTREAM, BUFFEREDREADER AND SCANNER Reading text data from keyboard using DataInputStream As we have seen in introduction to streams, DataInputStream is a FilterInputStream

More information

What is an I/O Stream?

What is an I/O Stream? Java I/O Stream 1 Topics What is an I/O stream? Types of Streams Stream class hierarchy Control flow of an I/O operation using Streams Byte streams Character streams Buffered streams Standard I/O streams

More information

Principles of Software Construction: Objects, Design, and Concurrency. Design Case Study: Stream I/O Some answers. Charlie Garrod Jonathan Aldrich

Principles of Software Construction: Objects, Design, and Concurrency. Design Case Study: Stream I/O Some answers. Charlie Garrod Jonathan Aldrich Principles of Software Construction: Objects, Design, and Concurrency Design Case Study: Stream I/O Some answers Fall 2014 Charlie Garrod Jonathan Aldrich School of Computer Science 2012-14 C Kästner,

More information

Readings and References. Topic #10: Java Input / Output. "Streams" are the basic I/O objects. Input & Output. Streams. The stream model A-1.

Readings and References. Topic #10: Java Input / Output. Streams are the basic I/O objects. Input & Output. Streams. The stream model A-1. Readings and References Topic #10: Java Input / Output CSE 413, Autumn 2004 Programming Languages Reading Other References» Section "I/O" of the Java tutorial» http://java.sun.com/docs/books/tutorial/essential/io/index.html

More information

320341 Programming in Java

320341 Programming in Java 320341 Programming in Java Fall Semester 2014 Lecture 10: The Java I/O System Instructor: Slides: Jürgen Schönwälder Bendick Mahleko Objectives This lecture introduces the following - Java Streams - Object

More information

JAVA - FILES AND I/O

JAVA - FILES AND I/O http://www.tutorialspoint.com/java/java_files_io.htm JAVA - FILES AND I/O Copyright tutorialspoint.com The java.io package contains nearly every class you might ever need to perform input and output I/O

More information

The Java I/O System. Binary I/O streams (ascii, 8 bits) The decorator design pattern Character I/O streams (Unicode, 16 bits)

The Java I/O System. Binary I/O streams (ascii, 8 bits) The decorator design pattern Character I/O streams (Unicode, 16 bits) Binary I/O streams (ascii, 8 bits) InputStream OutputStream The Java I/O System The decorator design pattern Character I/O streams (Unicode, 16 bits) Reader Writer Comparing Binary I/O to Character I/O

More information

CS 1302 Ch 19, Binary I/O

CS 1302 Ch 19, Binary I/O CS 1302 Ch 19, Binary I/O Sections Pages Review Questions Programming Exercises 19.1-19.4.1, 19.6-19.6 710-715, 724-729 Liang s Site any Sections 19.1 Introduction 1. An important part of programming is

More information

Simple Java I/O. Streams

Simple Java I/O. Streams Simple Java I/O Streams All modern I/O is stream-based A stream is a connection to a source of data or to a destination for data (sometimes both) An input stream may be associated with the keyboard An

More information

Today s Outline. Computer Communications. Java Communications uses Streams. Wrapping Streams. Stream Conventions 2/13/2016 CSE 132

Today s Outline. Computer Communications. Java Communications uses Streams. Wrapping Streams. Stream Conventions 2/13/2016 CSE 132 Today s Outline Computer Communications CSE 132 Communicating between PC and Arduino Java on PC (either Windows or Mac) Streams in Java An aside on class hierarchies Protocol Design Observability Computer

More information

Files and input/output streams

Files and input/output streams Unit 9 Files and input/output streams Summary The concept of file Writing and reading text files Operations on files Input streams: keyboard, file, internet Output streams: file, video Generalized writing

More information

WRITING DATA TO A BINARY FILE

WRITING DATA TO A BINARY FILE WRITING DATA TO A BINARY FILE TEXT FILES VS. BINARY FILES Up to now, we have looked at how to write and read characters to and from a text file. Text files are files that contain sequences of characters.

More information

Stream Classes and File I/O

Stream Classes and File I/O Stream Classes and File I/O A stream is any input source or output destination for data. The Java API includes about fifty classes for managing input/output streams. Objects of these classes can be instantiated

More information

AVRO - SERIALIZATION

AVRO - SERIALIZATION http://www.tutorialspoint.com/avro/avro_serialization.htm AVRO - SERIALIZATION Copyright tutorialspoint.com What is Serialization? Serialization is the process of translating data structures or objects

More information

Java Network Programming. The java.net package contains the Socket class. This class speaks TCP (connection-oriented protocol).

Java Network Programming. The java.net package contains the Socket class. This class speaks TCP (connection-oriented protocol). Java Network Programming The java.net package contains the Socket class. This class speaks TCP (connection-oriented protocol). The DatagramSocket class uses UDP (connectionless protocol). The java.net.socket

More information

Input / Output Framework java.io Framework

Input / Output Framework java.io Framework Date Chapter 11/6/2006 Chapter 10, start Chapter 11 11/13/2006 Chapter 11, start Chapter 12 11/20/2006 Chapter 12 11/27/2006 Chapter 13 12/4/2006 Final Exam 12/11/2006 Project Due Input / Output Framework

More information

D06 PROGRAMMING with JAVA

D06 PROGRAMMING with JAVA Cicles Formatius de Grau Superior Desenvolupament d Aplicacions Informàtiques D06 PROGRAMMING with JAVA Ch16 Files and Streams PowerPoint presentation, created by Angel A. Juan - ajuanp(@)gmail.com, for

More information

Building a Multi-Threaded Web Server

Building a Multi-Threaded Web Server Building a Multi-Threaded Web Server In this lab we will develop a Web server in two steps. In the end, you will have built a multi-threaded Web server that is capable of processing multiple simultaneous

More information

File I/O - Chapter 10. Many Stream Classes. Text Files vs Binary Files

File I/O - Chapter 10. Many Stream Classes. Text Files vs Binary Files File I/O - Chapter 10 A Java stream is a sequence of bytes. An InputStream can read from a file the console (System.in) a network socket an array of bytes in memory a StringBuffer a pipe, which is an OutputStream

More information

public static void main(string[] args) { System.out.println("hello, world"); } }

public static void main(string[] args) { System.out.println(hello, world); } } Java in 21 minutes hello world basic data types classes & objects program structure constructors garbage collection I/O exceptions Strings Hello world import java.io.*; public class hello { public static

More information

Chapter 20 Streams and Binary Input/Output. Big Java Early Objects by Cay Horstmann Copyright 2014 by John Wiley & Sons. All rights reserved.

Chapter 20 Streams and Binary Input/Output. Big Java Early Objects by Cay Horstmann Copyright 2014 by John Wiley & Sons. All rights reserved. Chapter 20 Streams and Binary Input/Output Big Java Early Objects by Cay Horstmann Copyright 2014 by John Wiley & Sons. All rights reserved. 20.1 Readers, Writers, and Streams Two ways to store data: Text

More information

www.virtualians.pk CS506 Web Design and Development Solved Online Quiz No. 01 www.virtualians.pk

www.virtualians.pk CS506 Web Design and Development Solved Online Quiz No. 01 www.virtualians.pk CS506 Web Design and Development Solved Online Quiz No. 01 Which of the following is a general purpose container? JFrame Dialog JPanel JApplet Which of the following package needs to be import while handling

More information

Amazon EC2 KAIST Haejoon LEE

Amazon EC2 KAIST Haejoon LEE Before VM Copy 계정 생성 및 sudo 권한, Java, Scala 설치 Hadoop Configuration 설정 Tar 압축 및 전송 >>tar cvfpz hadoop.tar.gz./hadoop >>scp -rp hadoop.tar.gz SecondaryNode:/usr/local >>scp 게./hadoop jjoon@hadoop-slave01:/home/jjoon/

More information

Chapter 10. A stream is an object that enables the flow of data between a program and some I/O device or file. File I/O

Chapter 10. A stream is an object that enables the flow of data between a program and some I/O device or file. File I/O Chapter 10 File I/O Streams A stream is an object that enables the flow of data between a program and some I/O device or file If the data flows into a program, then the stream is called an input stream

More information

Java from a C perspective. Plan

Java from a C perspective. Plan Java from a C perspective Cristian Bogdan 2D2052/ingint04 Plan Objectives and Book Packages and Classes Types and memory allocation Syntax and C-like Statements Object Orientation (minimal intro) Exceptions,

More information

CS 193A. Data files and storage

CS 193A. Data files and storage CS 193A Data files and storage This document is copyright (C) Marty Stepp and Stanford Computer Science. Licensed under Creative Commons Attribution 2.5 License. All rights reserved. Files and storage

More information

1 of 1 24/05/2013 10:23 AM

1 of 1 24/05/2013 10:23 AM ?Init=Y 1 of 1 24/05/2013 10:23 AM 1. Which of the following correctly defines a queue? a list of elements with a first in last out order. a list of elements with a first in first out order. (*) something

More information

Chulalongkorn University International School of Engineering Department of Computer Engineering 2140105 Computer Programming Lab.

Chulalongkorn University International School of Engineering Department of Computer Engineering 2140105 Computer Programming Lab. Chulalongkorn University Name International School of Engineering Student ID Department of Computer Engineering Station No. 2140105 Computer Programming Lab. Date Lab 2 Using Java API documents, command

More information

Event-Driven Programming

Event-Driven Programming Event-Driven Programming Lecture 4 Jenny Walter Fall 2008 Simple Graphics Program import acm.graphics.*; import java.awt.*; import acm.program.*; public class Circle extends GraphicsProgram { public void

More information

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. AVRO Tutorial

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. AVRO Tutorial i About the Tutorial Apache Avro is a language-neutral data serialization system, developed by Doug Cutting, the father of Hadoop. This is a brief tutorial that provides an overview of how to set up Avro

More information

java.util.scanner Here are some of the many features of Scanner objects. Some Features of java.util.scanner

java.util.scanner Here are some of the many features of Scanner objects. Some Features of java.util.scanner java.util.scanner java.util.scanner is a class in the Java API used to create a Scanner object, an extremely versatile object that you can use to input alphanumeric characters from several input sources

More information

Scanner. It takes input and splits it into a sequence of tokens. A token is a group of characters which form some unit.

Scanner. It takes input and splits it into a sequence of tokens. A token is a group of characters which form some unit. Scanner The Scanner class is intended to be used for input. It takes input and splits it into a sequence of tokens. A token is a group of characters which form some unit. For example, suppose the input

More information

Learning Outcomes. Networking. Sockets. TCP/IP Networks. Hostnames and DNS TCP/IP

Learning Outcomes. Networking. Sockets. TCP/IP Networks. Hostnames and DNS TCP/IP CP4044 Lecture 7 1 Networking Learning Outcomes To understand basic network terminology To be able to communicate using Telnet To be aware of some common network services To be able to implement client

More information

AP Computer Science Java Subset

AP Computer Science Java Subset APPENDIX A AP Computer Science Java Subset The AP Java subset is intended to outline the features of Java that may appear on the AP Computer Science A Exam. The AP Java subset is NOT intended as an overall

More information

Java-projekt @ ZEMRIS

Java-projekt @ ZEMRIS Java-projekt@ZEMRIS Package java.io Class java.io.file Svrha? upravljanje datotekama i direktorijima neovisno na kojoj platformi se izvodi program Kako? 3 konstruktora: Primjeri 1: Instanciranje razreda

More information

Introduction to Java I/O

Introduction to Java I/O Introduction to Java I/O Presented by developerworks, your source for great tutorials Table of Contents If you're viewing this document online, you can click any of the topics below to link directly to

More information

5 HDFS - Hadoop Distributed System

5 HDFS - Hadoop Distributed System 5 HDFS - Hadoop Distributed System 5.1 Definition and Remarks HDFS is a file system designed for storing very large files with streaming data access patterns running on clusters of commoditive hardware.

More information

All rights reserved. Copyright in this document is owned by Sun Microsystems, Inc.

All rights reserved. Copyright in this document is owned by Sun Microsystems, Inc. J2ME CLDC API 1.0 Copyright 2000 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, CA 94303 USA All rights reserved. Copyright in this document is owned by Sun Microsystems, Inc. Sun Microsystems,

More information

Creating a Simple, Multithreaded Chat System with Java

Creating a Simple, Multithreaded Chat System with Java Creating a Simple, Multithreaded Chat System with Java Introduction by George Crawford III In this edition of Objective Viewpoint, you will learn how to develop a simple chat system. The program will demonstrate

More information

Chapter 2: Elements of Java

Chapter 2: Elements of Java Chapter 2: Elements of Java Basic components of a Java program Primitive data types Arithmetic expressions Type casting. The String type (introduction) Basic I/O statements Importing packages. 1 Introduction

More information

Quick Introduction to Java

Quick Introduction to Java Quick Introduction to Java Dr. Chris Bourke Department of Computer Science & Engineering University of Nebraska Lincoln Lincoln, NE 68588, USA Email: cbourke@cse.unl.edu 2015/10/30 20:02:28 Abstract These

More information

First Java Programs. V. Paúl Pauca. CSC 111D Fall, 2015. Department of Computer Science Wake Forest University. Introduction to Computer Science

First Java Programs. V. Paúl Pauca. CSC 111D Fall, 2015. Department of Computer Science Wake Forest University. Introduction to Computer Science First Java Programs V. Paúl Pauca Department of Computer Science Wake Forest University CSC 111D Fall, 2015 Hello World revisited / 8/23/15 The f i r s t o b l i g a t o r y Java program @author Paul Pauca

More information

Introduction to Java Applications. 2005 Pearson Education, Inc. All rights reserved.

Introduction to Java Applications. 2005 Pearson Education, Inc. All rights reserved. 1 2 Introduction to Java Applications 2.2 First Program in Java: Printing a Line of Text 2 Application Executes when you use the java command to launch the Java Virtual Machine (JVM) Sample program Displays

More information

Lecture 5: Java Fundamentals III

Lecture 5: Java Fundamentals III Lecture 5: Java Fundamentals III School of Science and Technology The University of New England Trimester 2 2015 Lecture 5: Java Fundamentals III - Operators Reading: Finish reading Chapter 2 of the 2nd

More information

Using NetBeans IDE to Build Quick UI s Ray Hylock, GISo Tutorial 3/8/2011

Using NetBeans IDE to Build Quick UI s Ray Hylock, GISo Tutorial 3/8/2011 Using NetBeans IDE to Build Quick UI s Ray Hylock, GISo Tutorial 3/8/2011 We will be building the following application using the NetBeans IDE. It s a simple nucleotide search tool where we have as input

More information

Single Application Persistent Data Storage

Single Application Persistent Data Storage Single Application Persistent Data Storage Files SharedPreferences SQLite database Represents a file system entity identified by a pathname Storage areas classified as internal or external Internal memory

More information

Introduction to Java

Introduction to Java Introduction to Java The HelloWorld program Primitive data types Assignment and arithmetic operations User input Conditional statements Looping Arrays CSA0011 Matthew Xuereb 2008 1 Java Overview A high

More information

java Features Version April 19, 2013 by Thorsten Kracht

java Features Version April 19, 2013 by Thorsten Kracht java Features Version April 19, 2013 by Thorsten Kracht Contents 1 Introduction 2 1.1 Hello World................................................ 2 2 Variables, Types 3 3 Input/Output 4 3.1 Standard I/O................................................

More information

Java Interview Questions and Answers

Java Interview Questions and Answers 1. What is the most important feature of Java? Java is a platform independent language. 2. What do you mean by platform independence? Platform independence means that we can write and compile the java

More information

Object-Oriented Programming in Java

Object-Oriented Programming in Java CSCI/CMPE 3326 Object-Oriented Programming in Java Class, object, member field and method, final constant, format specifier, file I/O Dongchul Kim Department of Computer Science University of Texas Rio

More information

Entrada/Salida basada en

Entrada/Salida basada en Entrada/Salida basada en Streams Pedro Corcuera Dpto. Matemática Aplicada y Ciencias de la Computación Universidad de Cantabria corcuerp@unican.es Objetivos Estudiar las clases de Entrada/Salida basadas

More information

C++ Wrapper Library for Firebird Embedded SQL

C++ Wrapper Library for Firebird Embedded SQL C++ Wrapper Library for Firebird Embedded SQL Written by: Eugene Wineblat, Software Developer of Network Security Team, ApriorIT Inc. www.apriorit.com 1. Introduction 2. Embedded Firebird 2.1. Limitations

More information

Files and Streams. Writeappropriatecodetoread,writeandupdatefilesusingFileInputStream, FileOutputStream and RandomAccessFile objects.

Files and Streams. Writeappropriatecodetoread,writeandupdatefilesusingFileInputStream, FileOutputStream and RandomAccessFile objects. 18 Files and Streams Supplementary Objectives Write code that uses objects of the File class to navigate the file system. Distinguish between byte and character streams, and identify the roots of their

More information

Decorator Pattern [GoF]

Decorator Pattern [GoF] Decorator Pattern [GoF] Intent Attach additional capabilities to objects dynamically. Decorators provide a flexible alternative to subclassing for extending functionality. Also Known As Wrapper. Motivation

More information

COSC 6397 Big Data Analytics. Distributed File Systems (II) Edgar Gabriel Spring 2014. HDFS Basics

COSC 6397 Big Data Analytics. Distributed File Systems (II) Edgar Gabriel Spring 2014. HDFS Basics COSC 6397 Big Data Analytics Distributed File Systems (II) Edgar Gabriel Spring 2014 HDFS Basics An open-source implementation of Google File System Assume that node failure rate is high Assumes a small

More information

Network/Socket Programming in Java. Rajkumar Buyya

Network/Socket Programming in Java. Rajkumar Buyya Network/Socket Programming in Java Rajkumar Buyya Elements of C-S Computing a client, a server, and network Client Request Result Network Server Client machine Server machine java.net Used to manage: URL

More information

Handout 1. Introduction to Java programming language. Java primitive types and operations. Reading keyboard Input using class Scanner.

Handout 1. Introduction to Java programming language. Java primitive types and operations. Reading keyboard Input using class Scanner. Handout 1 CS603 Object-Oriented Programming Fall 15 Page 1 of 11 Handout 1 Introduction to Java programming language. Java primitive types and operations. Reading keyboard Input using class Scanner. Java

More information

FILE I/O IN JAVA. Prof. Chris Jermaine cmj4@cs.rice.edu. Prof. Scott Rixner rixner@cs.rice.edu

FILE I/O IN JAVA. Prof. Chris Jermaine cmj4@cs.rice.edu. Prof. Scott Rixner rixner@cs.rice.edu FILE I/O IN JAVA Prof. Chris Jermaine cmj4@cs.rice.edu Prof. Scott Rixner rixner@cs.rice.edu 1 Our Simple Java Programs So Far Aside from screen I/O......when they are done, they are gone They have no

More information

Programming Languages CIS 443

Programming Languages CIS 443 Course Objectives Programming Languages CIS 443 0.1 Lexical analysis Syntax Semantics Functional programming Variable lifetime and scoping Parameter passing Object-oriented programming Continuations Exception

More information

Java Network. Slides prepared by : Farzana Rahman

Java Network. Slides prepared by : Farzana Rahman Java Network Programming 1 Important Java Packages java.net java.io java.rmi java.security java.lang TCP/IP networking I/O streams & utilities Remote Method Invocation Security policies Threading classes

More information

El Dorado Union High School District Educational Services

El Dorado Union High School District Educational Services El Dorado Union High School District Course of Study Information Page Course Title: ACE Computer Programming II (#495) Rationale: A continuum of courses, including advanced classes in technology is needed.

More information

Continuous Integration Part 2

Continuous Integration Part 2 1 Continuous Integration Part 2 This blog post is a follow up to my blog post Continuous Integration (CI), in which I described how to execute test cases in Code Tester (CT) in a CI environment. What I

More information

Chapter 1 Fundamentals of Java Programming

Chapter 1 Fundamentals of Java Programming Chapter 1 Fundamentals of Java Programming Computers and Computer Programming Writing and Executing a Java Program Elements of a Java Program Features of Java Accessing the Classes and Class Members The

More information

Chapter 11: Input/Output Organisation. Lesson 06: Programmed IO

Chapter 11: Input/Output Organisation. Lesson 06: Programmed IO Chapter 11: Input/Output Organisation Lesson 06: Programmed IO Objective Understand the programmed IO mode of data transfer Learn that the program waits for the ready status by repeatedly testing the status

More information

Software Architectures

Software Architectures Software Architectures 2 SWS Lecture 1 SWS Lab Classes Hans-Werner Sehring Miguel Garcia Arbeitsbereich Softwaresysteme (STS) TU Hamburg-Harburg HW.Sehring@tuhh.de Miguel.Garcia@tuhh.de http://www.sts.tu-harburg.de/teaching/ss-05/swarch/entry.html

More information

CS 111 Classes I 1. Software Organization View to this point:

CS 111 Classes I 1. Software Organization View to this point: CS 111 Classes I 1 Software Organization View to this point: Data Objects and primitive types Primitive types operators (+, /,,*, %). int, float, double, char, boolean Memory location holds the data Objects

More information

Areca's file-system access layer

Areca's file-system access layer Areca's file-system access layer The java.io.file class is simply used as a pointer by Areca. That means that the read/write methods (such as delete, mkdir, isfile, ) are NEVER invoked directly. Instead,

More information

Java Programming Fundamentals

Java Programming Fundamentals Lecture 1 Part I Java Programming Fundamentals Topics in Quantitative Finance: Numerical Solutions of Partial Differential Equations Instructor: Iraj Kani Introduction to Java We start by making a few

More information

Introduction to Programming

Introduction to Programming Introduction to Programming Lecturer: Steve Maybank Department of Computer Science and Information Systems sjmaybank@dcs.bbk.ac.uk Spring 2015 Week 2b: Review of Week 1, Variables 16 January 2015 Birkbeck

More information

Masters programmes in Computer Science and Information Systems. Object-Oriented Design and Programming. Sample module entry test xxth December 2013

Masters programmes in Computer Science and Information Systems. Object-Oriented Design and Programming. Sample module entry test xxth December 2013 Masters programmes in Computer Science and Information Systems Object-Oriented Design and Programming Sample module entry test xxth December 2013 This sample paper has more questions than the real paper

More information

An Overview of Java. overview-1

An Overview of Java. overview-1 An Overview of Java overview-1 Contents What is Java Major Java features Java virtual machine Java programming language Java class libraries (API) GUI Support in Java Networking and Threads in Java overview-2

More information

Topics. Parts of a Java Program. Topics (2) CS 146. Introduction To Computers And Java Chapter Objectives To understand:

Topics. Parts of a Java Program. Topics (2) CS 146. Introduction To Computers And Java Chapter Objectives To understand: Introduction to Programming and Algorithms Module 2 CS 146 Sam Houston State University Dr. Tim McGuire Introduction To Computers And Java Chapter Objectives To understand: the meaning and placement of

More information

B.Sc (Honours) - Software Development

B.Sc (Honours) - Software Development Galway-Mayo Institute of Technology B.Sc (Honours) - Software Development E-Commerce Development Technologies II Lab Session Using the Java URLConnection Class The purpose of this lab session is to: (i)

More information

Chapter 1 Java Program Design and Development

Chapter 1 Java Program Design and Development presentation slides for JAVA, JAVA, JAVA Object-Oriented Problem Solving Third Edition Ralph Morelli Ralph Walde Trinity College Hartford, CT published by Prentice Hall Java, Java, Java Object Oriented

More information

13 File Output and Input

13 File Output and Input SCIENTIFIC PROGRAMMING -1 13 File Output and Input 13.1 Introduction To make programs really useful we have to be able to input and output data in large machinereadable amounts, in particular we have to

More information

Mail User Agent Project

Mail User Agent Project Mail User Agent Project Tom Kelliher, CS 325 100 points, due May 4, 2011 Introduction (From Kurose & Ross, 4th ed.) In this project you will implement a mail user agent (MUA) that sends mail to other users.

More information

Variables, Constants, and Data Types

Variables, Constants, and Data Types Variables, Constants, and Data Types Primitive Data Types Variables, Initialization, and Assignment Constants Characters Strings Reading for this class: L&L, 2.1-2.3, App C 1 Primitive Data There are eight

More information

Crash Course in Java

Crash Course in Java Crash Course in Java Based on notes from D. Hollinger Based in part on notes from J.J. Johns also: Java in a Nutshell Java Network Programming and Distributed Computing Netprog 2002 Java Intro 1 What is

More information

CS 106 Introduction to Computer Science I

CS 106 Introduction to Computer Science I CS 106 Introduction to Computer Science I 01 / 21 / 2014 Instructor: Michael Eckmann Today s Topics Introduction Homework assignment Review the syllabus Review the policies on academic dishonesty and improper

More information

Contents. 9-1 Copyright (c) 1999-2004 N. Afshartous

Contents. 9-1 Copyright (c) 1999-2004 N. Afshartous Contents 1. Introduction 2. Types and Variables 3. Statements and Control Flow 4. Reading Input 5. Classes and Objects 6. Arrays 7. Methods 8. Scope and Lifetime 9. Utility classes 10. Introduction to

More information

A File System Design for the Aeolus Security Platform. Francis Peter McKee

A File System Design for the Aeolus Security Platform. Francis Peter McKee A File System Design for the Aeolus Security Platform by Francis Peter McKee S.B., C.S. M.I.T., 2011 Submitted to the Department of Electrical Engineering and Computer Science in Partial Fulfillment of

More information

Storing Measurement Data

Storing Measurement Data Storing Measurement Data File I/O records or reads data in a file. A typical file I/O operation involves the following process. 1. Create or open a file. Indicate where an existing file resides or where

More information

Illustration 1: Diagram of program function and data flow

Illustration 1: Diagram of program function and data flow The contract called for creation of a random access database of plumbing shops within the near perimeter of FIU Engineering school. The database features a rating number from 1-10 to offer a guideline

More information

HDFS - Java API. 2012 coreservlets.com and Dima May. 2012 coreservlets.com and Dima May

HDFS - Java API. 2012 coreservlets.com and Dima May. 2012 coreservlets.com and Dima May 2012 coreservlets.com and Dima May HDFS - Java API Originals of slides and source code for examples: http://www.coreservlets.com/hadoop-tutorial/ Also see the customized Hadoop training courses (onsite

More information

Pemrograman Dasar. Basic Elements Of Java

Pemrograman Dasar. Basic Elements Of Java Pemrograman Dasar Basic Elements Of Java Compiling and Running a Java Application 2 Portable Java Application 3 Java Platform Platform: hardware or software environment in which a program runs. Oracle

More information

C++ INTERVIEW QUESTIONS

C++ INTERVIEW QUESTIONS C++ INTERVIEW QUESTIONS http://www.tutorialspoint.com/cplusplus/cpp_interview_questions.htm Copyright tutorialspoint.com Dear readers, these C++ Interview Questions have been designed specially to get

More information

The Sun Certified Associate for the Java Platform, Standard Edition, Exam Version 1.0

The Sun Certified Associate for the Java Platform, Standard Edition, Exam Version 1.0 The following applies to all exams: Once exam vouchers are purchased you have up to one year from the date of purchase to use it. Each voucher is valid for one exam and may only be used at an Authorized

More information

JAVA REMOTE CONTROL SYSTEM

JAVA REMOTE CONTROL SYSTEM Lining Xu JAVA REMOTE CONTROL SYSTEM Thesis CENTRIA UNIVERSITY OF APPLIED SCIENCES Information Technology March 2016 Abstract Unit Kokkola-Pietasaari Degree programme Information Technology Name of thesis

More information

Lesson: All About Sockets

Lesson: All About Sockets All About Sockets http://java.sun.com/docs/books/tutorial/networking/sockets/index.html Page 1 sur 1 The Java TM Tutorial Start of Tutorial > Start of Trail Trail: Custom Networking Lesson: All About Sockets

More information

Object-Oriented Design Lecture 4 CSU 370 Fall 2007 (Pucella) Tuesday, Sep 18, 2007

Object-Oriented Design Lecture 4 CSU 370 Fall 2007 (Pucella) Tuesday, Sep 18, 2007 Object-Oriented Design Lecture 4 CSU 370 Fall 2007 (Pucella) Tuesday, Sep 18, 2007 The Java Type System By now, you have seen a fair amount of Java. Time to study in more depth the foundations of the language,

More information

Improving Usability of Information Flow Security in Java

Improving Usability of Information Flow Security in Java Improving Usability of Information Flow Security in Java Scott F. Smith and Mark Thober Department of Computer Science Johns Hopkins University {scott,mthober@cs.jhu.edu Abstract Thiaper focuses on improving

More information

Question1-part2 What undesirable consequences might there be in having too long a DNS cache entry lifetime?

Question1-part2 What undesirable consequences might there be in having too long a DNS cache entry lifetime? CSCI 312 - DATA COMMUNICATIONS AND NETWORKS FALL, 2014 Assignment 4 Working as a group. Working in small gruops of 2-4 students. When you work as a group, you have to return only one home assignment per

More information

Computing Concepts with Java Essentials

Computing Concepts with Java Essentials 2008 AGI-Information Management Consultants May be used for personal purporses only or by libraries associated to dandelon.com network. Computing Concepts with Java Essentials 3rd Edition Cay Horstmann

More information

Java Cheatsheet. http://introcs.cs.princeton.edu/java/11cheatsheet/ Tim Coppieters Laure Philips Elisa Gonzalez Boix

Java Cheatsheet. http://introcs.cs.princeton.edu/java/11cheatsheet/ Tim Coppieters Laure Philips Elisa Gonzalez Boix Java Cheatsheet http://introcs.cs.princeton.edu/java/11cheatsheet/ Tim Coppieters Laure Philips Elisa Gonzalez Boix Hello World bestand genaamd HelloWorld.java naam klasse main methode public class HelloWorld

More information

Web Development in Java

Web Development in Java Web Development in Java Detailed Course Brochure @All Rights Reserved. Techcanvass, 265, Powai Plaza, Hiranandani Garden, Powai, Mumbai www.techcanvass.com Tel: +91 22 40155175 Mob: 773 877 3108 P a g

More information

This example illustrates how to copy contents from one file to another file. This topic is related to the I/O (input/output) of

This example illustrates how to copy contents from one file to another file. This topic is related to the I/O (input/output) of Java Frameworks Databases Technology Development Build/Test tools OS Servers PHP Books More What's New? Core Java JSP Servlets XML EJB JEE5 Web Services J2ME Glossary Questions? Software Development Search

More information

Java and XML parsing. EH2745 Lecture #8 Spring 2015. larsno@kth.se

Java and XML parsing. EH2745 Lecture #8 Spring 2015. larsno@kth.se Java and XML parsing EH2745 Lecture #8 Spring 2015 larsno@kth.se Lecture Outline Quick Review The XML language Parsing Files in Java Quick Review We have in the first set of Lectures covered the basics

More information

System Calls Related to File Manipulation

System Calls Related to File Manipulation KING FAHD UNIVERSITY OF PETROLEUM AND MINERALS Information and Computer Science Department ICS 431 Operating Systems Lab # 12 System Calls Related to File Manipulation Objective: In this lab we will be

More information

Introduction to: Computers & Programming: Input and Output (IO)

Introduction to: Computers & Programming: Input and Output (IO) Introduction to: Computers & Programming: Input and Output (IO) Adam Meyers New York University Summary What is Input and Ouput? What kinds of Input and Output have we covered so far? print (to the console)

More information