Arvutiteaduse instituut
  1. Kursused
  2. 2018/19 kevad
  3. Objektorienteeritud programmeerimine (Narva Kolledž) (LTAT.NR.003)
EN
Logi sisse

Objektorienteeritud programmeerimine (Narva Kolledž) 2018/19 kevad

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

Before session 10

Streams

Objectives:

After completing the session, a student can:

  • 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.

Streams are used together with exceptions. 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 Byte streams
  • 10.3 Character streams
  • 10.4 Buffered streams
  • 10.5 Data streams
  • 10.6 Some tricks with streams
  • 10.7 Tasks

Cheat sheet

  • Java IO
  • Java I/O presentation
  • 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