Arvutiteaduse instituut
  1. Kursused
  2. 2017/18 kevad
  3. Objektorienteeritud programmeerimine (Narva Kolledž) (P2NC.01.083)
EN
Logi sisse

Objektorienteeritud programmeerimine (Narva Kolledž) 2017/18 kevad

  • Home
  • Materials
  • Java Glossary
  • Source Example
  • Cheat sheet (S1-S6)
  • Grading
  • Links

Before session 10

Streams

Objectives:

When you finish this module, you will

  • create, modify and delete files and folders, using the class File;
  • write bytes to a file and read them back from the file, using FileOutputStream and FileInputStream;
  • write text data to a file and read them back from the file, using OutputStreamWriter and InputStreamReader;
  • write text data to a file and read them back from the buffer, using BufferedOutputStream and BufferedInputStream;
  • write values of primitive data types to a file and read them back from the file, using DataOutputStream and DataInputStream.

The streams are used with exceptions. However, exceptions will be explained in details next week. Hereof, please add into the methods' signature the following two words - throws Exception.

Topics

  • 10.1 Introduction
  • 10.2 Streams
  • 10.3 Text encoding
  • 10.4 Stream buffering
  • 10.5 Some tricks with streams
  • 10.6 Input and output of primitive data types
  • 10.7 Tasks

Cheat sheet

  • Java I/O short summary
  • Java I/O presentation
  • Java I/O examples
  • Java I/O examples

Alternative materials

  • in English: H. Schildt.‎ Java - The Complete Reference: Chapter: 13
  • in Estonian: here
  • in Russian: Г. Шилдт. Java 8. Полное руководство: Chapter: 13

  • Arvutiteaduse instituut
  • Loodus- ja täppisteaduste valdkond
  • Tartu Ülikool
Tehniliste probleemide või küsimuste korral kirjuta:

Kursuse sisu ja korralduslike küsimustega pöörduge kursuse korraldajate poole.
Õppematerjalide varalised autoriõigused kuuluvad Tartu Ülikoolile. Õppematerjalide kasutamine on lubatud autoriõiguse seaduses ettenähtud teose vaba kasutamise eesmärkidel ja tingimustel. Õppematerjalide kasutamisel on kasutaja kohustatud viitama õppematerjalide autorile.
Õppematerjalide kasutamine muudel eesmärkidel on lubatud ainult Tartu Ülikooli eelneval kirjalikul nõusolekul.
Courses’i keskkonna kasutustingimused