Skip to content

Latest commit

Β 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Java File Viewer

A lightweight console utility written in Java using only terminal that reads a text file, prints its content, and extracts comprehensive file metadata and text statistics.

🎯 Project Goals

This is a personal learning project built to achieve the following objectives:

  1. Practice core Java programming concepts, specifically file I/O operations (java.nio).
  2. Master version control workflows by interacting with Git entirely through the terminal (initializing repositories, staging changes, writing structured commit messages, managing .gitignore, and pushing to GitHub).

πŸš€ Features

  • Content Streaming: Displays file contents directly in the console with explicit UTF-8 encoding support.
  • Single-Pass Performance: Collects all text statistics efficiently in a single file read.
  • Detailed Metadata:
    • File timestamps (creation, last access, and last modification times).
    • File attributes (type verification and read/write permission status).
    • Formatted file size dynamically scaled to B, KB, or MB.
    • Text metrics including precise line, word, and non-whitespace character counts.

πŸ“¦ Running via Terminal

  1. Compile the source code (run from the project root directory):

    javac -d bin src/Main.java
  2. Execute the application by passing the path to a target file as an argument:

    java -cp bin Main story.txt

About

A simple Java command-line utility for viewing TXT file contents and detailed metadata written entirely in terminal.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages