JavaRush
AI Academy
new
Promotion
Learning
Courses
Tasks
Quizzes
Games
Help
Schedule of nudges
Internship
Community
Users
Forum
Chat
Articles
Activities
Reviews
Subscriptions
Light theme

Lectures

  • Reviews
  • About us
  • CS50
Start
Start learning
Start learning
  • My progress
  • Courses
  • Quest map
  • Lectures
  • io.Reader/io.Writer — a streaming model for files

    Go SELF
    40 level,0 lecture
    We break down the streaming I/O model in Go: why files and streams are read in “chunks”, how the contracts of io.Reader and io.Writer work, how to correctly interpret the pair n/ err (including io.EOF), what a short write is, and how to write reliable read/write loops in practice (counting lines, dumping a file to stdout).
    Open
  • bufio.Reader/Writer: buffering and Flush()

    Go SELF
    40 level,1 lecture
    We break down why buffering is needed in Go and how it is implemented in the bufio package: how bufio.Reader “pre-reads” data on top of io.Reader, how to read lines via ReadString/ ReadBytes, and how to handle io.EOF correctly. Separately, we cover how bufio.Writer works, why data can “get stuck” until Flush(), how Flush() and Close() differ, and which beginner mistakes are most common.
    Open
  • bufio.Scanner: token size limits

    Go SELF
    40 level,2 lecture
    We break down how bufio.Scanner works: what a “token” is, why the scanner has a MaxScanTokenSize limit (by default about 64 KiB), how the bufio.ErrTooLong error shows up, how to correctly increase the maximum via Scanner.Buffer, and when it’s better to use bufio.Reader with ReadString/ ReadBytes for full control over reading.
    Open
  • io.Copy / io.CopyN — when to use them

    Go SELF
    40 level,3 lecture
    We break down why in Go you should use io.Copy and io.CopyN instead of a manual Read/ Write loop: the argument order dst/ src, correct handling of io.EOF, “partial progress” in written, adding error context via fmt.Errorf, as well as the buffering nuance with bufio.Writer and the need for Flush(). Practice: copying files via os.Open/ os.Create, backups, and previewing the first N bytes.
    Open
  • Design “I/O as a layer”: io.Reader/io.Writer and code

    Go SELF
    40 level,4 lecture
    We break down the “I/O as a layer” approach in Go: why business logic should not know about files, how to design functions around io.Reader/ io.Writer, who is responsible for calling Close(), why bufio.Writer requires Flush(), and how this lets you test code without a disk using strings.NewReader and bytes.Buffer.
    Open
Learn
  • Registration
  • Java course
  • Help with tasks
  • Pricing
Community
  • Users
  • Articles
  • Forum
  • Chat
  • Activities
Company
  • About us
  • Contacts
  • Reviews
  • FAQ
  • Support
JavaRushJavaRush — is an interactive online course for learning Java programming from scratch. It contains 1200 practical tasks with one-click solution checking, the necessary minimum of theory on Java basics, and motivating features that help you complete the course: games, quizzes, interesting projects and articles on effective learning and the career of a Java developer.
Follow us
Язык интерфейса
Русский
English
Українська
"Programmers are not born" © 2026 JavaRush
MastercardVisa
"Programmers are not born" © 2026 JavaRush