CodeGym
CodeGym University
Java FullStack
Learning
Courses
Tasks
Surveys & Quizzes
Games
Help
Schedule
Community
Users
Forum
Chat
Articles
Success stories
Activity
Reviews
Subscriptions
Light theme

Lessons

  • Reviews
  • About us
Start
Start learning
Start learning now
  • My Progress
  • Courses
  • University
  • Quest Map
  • Lessons
  • IO performance bottlenecks

    JAVA 25 SELF
    Level 41, Lesson 0
    This lecture explains what a “bottleneck” in input/output is, and how to detect and eliminate it. We will break down why disk and network operations are significantly slower than RAM, which anti-patterns are common (reading one byte at a time via read(), synchronous logs, etc.), how buffers help ( BufferedInputStream, BufferedReader), profilers ( VisualVM, JProfiler), and timing via System. currentTimeMillis (). We will run a practical experiment reading the file "bigfile.txt", compare speed with and without buffering, look at the impact of SSD/HDD and the network, and list typical mistakes.
    Available
  • NIO Channels and ByteBuffer

    JAVA 25 SELF
    Level 41, Lesson 1
    A practical introduction to non-blocking Java NIO I/O: we examine how channels Channel and buffers ByteBuffer differ from streams InputStream/ OutputStream, how to read and write using FileChannel, seek with position() and resize with truncate(), work with buffer parameters ( capacity, limit, position, mark), and choose between allocate() and allocateDirect(). We show zero-copy operations transferTo()/ transferFrom() and typical mistakes like a forgotten flip() and an incorrect buffer mode.
    Available
  • Large files: chunking patterns

    JAVA 25 SELF
    Level 41, Lesson 2
    How to efficiently process files tens of gigabytes in size without OutOfMemoryError: split into chunks, read by position via RandomAccessFile and FileChannel, parallelize tasks with ExecutorService/ ForkJoinPool, and for simple copying use zero-copy via transferTo/ transferFrom. We discuss choosing chunk size, handling line boundaries, synchronizing results, and common mistakes.
    Available
  • Working with large files: chunking, memory mapping

    JAVA 25 SELF
    Level 41, Lesson 3
    How to safely and quickly process huge files in Java: read in parts (chunking) via streams and buffers, tune buffer size for performance, use memory mapping via MappedByteBuffer and FileChannel for ultra-fast random access. We will cover the pros and cons of memory mapping, recommendations on resources and parallelism, as well as common mistakes (for example, OutOfMemoryError, forgotten descriptors, chunk overlap during search).
    Available
  • Archives/compression: java.util.zip

    JAVA 25 SELF
    Level 41, Lesson 4
    A hands-on lecture on working with archives and compression in Java: get familiar with the java.util.zip package, the ZipInputStream/ ZipOutputStream streams and the random-access class ZipFile, control compression levels via Deflater ( 0… 9, DEFAULT_COMPRESSION), work with GZIPInputStream/ GZIPOutputStream for single files, and pack/unpack directories using Files.walk and filtering with PathMatcher ( "glob:**/*.txt"). We will discuss security: protection against Zip Slip via path normalization and volume control for a zip bomb, and also build a mini CLI “zip/unzip” with globs.
    Available
  • Introduction to object serialization: why you need it

    JAVA 25 SELF
    Level 42, Lesson 0
    Why and how to “pack” objects in Java: turn them into a byte stream and back using ObjectOutputStream/ ObjectInputStream, persist state between launches, send over the network, and cache results. We break down the role of the Serializable interface, nuances with the transient keyword and strings like "save.dat", discuss security risks and version compatibility. Practice: a mini game save, client↔server message sending, and computation caching.
    Available
  • Serializable Interface: Basic Principles

    JAVA 25 SELF
    Level 42, Lesson 1
    We cover the basics of serialization in Java: the marker interface java.io.Serializable, how to mark a class using implements Serializable, field requirements ( static, transient), step-by-step examples of writing and reading objects with ObjectOutputStream/ ObjectInputStream, what happens “under the hood” when calling writeObject/ readObject, as well as common mistakes (non-serializable fields, inner classes, behavior of static fields, and class versioning via serialVersionUID).
    Available
  • Standard serialization formats: binary, text

    JAVA 25 SELF
    Level 42, Lesson 2
    In this lecture, we compare Java binary serialization via the ObjectOutputStream and ObjectInputStream classes with text formats ( JSON, XML): how they work, speed and compactness, version compatibility, and security. We examine advantages and limitations, show hands-on practice with Jackson (including the Maven dependency), and give advice on when to choose which, along with common mistakes.
    Available
  • ObjectOutputStream, ObjectInputStream: working with streams

    JAVA 25 SELF
    Level 42, Lesson 3
    In this lecture, we analyze how to serialize and deserialize objects in Java using the paired streams ObjectOutputStream and ObjectInputStream: what the marker interface java.io.Serializable is, how the methods writeObject() and readObject() work, why static and transient fields are not written to the stream, which exceptions occur ( NotSerializableException, InvalidClassException), and what serialVersionUID affects. In practice, we serialize one object and a list of objects to a file and go through typical mistakes.
    Available
  • Serialization of Collections: List, Map, Set

    JAVA 25 SELF
    Level 42, Lesson 4
    A practical guide to serializing collections in Java: how to save and restore List, Map, Set via ObjectOutputStream/ ObjectInputStream; why most collections already implement Serializable; requirements for elements; ordering behavior in HashSet/ HashMap; working with nested and empty collections; pitfalls ( InvalidClassException, serialVersionUID, transient/ static). We finish with a full-fledged “virtual library” example.
    Available
  • Controlling the serialization process: writeObject, readObject

    JAVA 25 SELF
    Level 43, Lesson 0
    How to intercept default serialization and take control of the process: use private writeObject/ readObject methods with strict signatures ( private void writeObject( ObjectOutputStream out) throws IOException), call defaultWriteObject()/ defaultReadObject(), exclude fields via transient, add checksums and logs, and don’t forget about serialVersionUID and version compatibility. We cover common mistakes, working with ObjectOutputStream/ ObjectInputStream, and practical examples.
    Available
  • transient fields, serialVersionUID

    JAVA 25 SELF
    Level 43, Lesson 1
    A practical guide to serialization in Java: when and how to use transient to exclude fields from the stream, what happens during deserialization (default values), how to restore state in the readObject method; what serialVersionUID is, how to declare it ( private static final long serialVersionUID = 1L), when to change it, and why it’s better to set it explicitly. Working examples, risky scenarios, and common mistakes are shown.
    Available
  • 1
  • ...
  • 18
  • 19
  • 20
  • 21
  • 22
  • ...
  • 30
Learn
  • Registration
  • Java Course
  • Help with Tasks
  • Pricing
  • Java Syntax
Community
  • Users
  • Articles
  • Forum
  • Chat
  • Success Stories
  • Activity
  • Affiliate Program
Company
  • About us
  • Contacts
  • Reviews
  • Press Room
  • CodeGym for EDU
  • FAQ
  • Support
CodeGym CodeGym is an online course for learning Java programming from scratch. This course is a perfect way to master Java for beginners. It contains 1200+ tasks with instant verification and an essential scope of Java fundamentals theory. To help you succeed in education, we’ve implemented a set of motivational features: quizzes, coding projects, content about efficient learning, and a Java developer’s career.
Follow us
Interface language
English
Deutsch Español हिन्दी Français Português Polski বাংলা 简体中文 मराठी தமிழ் Italiano Bahasa Indonesia 繁體中文 Nederlands 日本語 한국어 Bulgarian Danish Hungarian Basa Jawa Malay Norwegian Romanian Swedish Telugu Thai Українська Filipino Turkish Azərbaycan Русский Vietnamese
Programmers Are Made, Not Born © 2026 CodeGym
MastercardVisa
Programmers Are Made, Not Born © 2026 CodeGym