| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
General-purpose utility library providing binary I/O stream abstractions with zero-copy byte array data input/output, compression utilities, and common helpers for arrays, characters, classes, numbers, primitives, strings, and system operations. Also includes mutable wrapper types, a stopwatch timer, and date formatting.
Important
This library requires Java 21 or later. It depends on collections and is published via JitPack.
| Requirement | Version | Notes |
|---|---|---|
| Java | 21+ | Required |
| Gradle | 9.4+ | Included via wrapper |
| Git | 2.x+ | For cloning the repository |
Add the JitPack repository and dependency to your build.gradle.kts:
repositories {
maven(url = "https://jitpack.io")
}
dependencies {
implementation("com.github.simplified-dev:utils:master-SNAPSHOT")
}Note
This library transitively depends on collections. JitPack resolves it automatically.
repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'com.github.simplified-dev:utils:master-SNAPSHOT'
}<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependency>
<groupId>com.github.simplified-dev</groupId>
<artifactId>utils</artifactId>
<version>master-SNAPSHOT</version>
</dependency>Zero-copy byte array reading and writing:
import dev.simplified.util.io.ByteArrayDataOutput;
import dev.simplified.util.io.ByteArrayDataInput;
// Write data
ByteArrayDataOutput output = new ByteArrayDataOutput();
output.writeInt(42);
output.writeUTF("hello");
byte[] bytes = output.toByteArray();
// Read data
ByteArrayDataInput input = new ByteArrayDataInput(bytes);
int number = input.readInt();
String text = input.readUTF();Compress and decompress byte arrays:
import dev.simplified.util.compression.Compression;
byte[] compressed = Compression.compress(data);
byte[] decompressed = Compression.decompress(compressed);Common helpers for everyday operations:
import dev.simplified.util.StringUtil;
import dev.simplified.util.NumberUtil;
import dev.simplified.util.ArrayUtil;
// String operations
boolean empty = StringUtil.isEmpty(value);
// Number parsing
int parsed = NumberUtil.parseInt(text, defaultValue);
// Array operations
String[] merged = ArrayUtil.merge(first, second);Pass-by-reference semantics for primitives:
import dev.simplified.util.mutable.MutableInt;
MutableInt counter = new MutableInt(0);
counter.increment();
int value = counter.get();Measure elapsed time:
import dev.simplified.util.time.Stopwatch;
Stopwatch stopwatch = Stopwatch.start();
// ... perform work ...
long elapsedMs = stopwatch.elapsedMillis();utils/ ├── src/ │ ├── main/java/dev/simplified/ │ │ └── util/ │ │ ├── compression/ │ │ │ ├── Compression.java # Compression dispatch + format detection │ │ │ ├── GzipCompression.java # Pre-sized gzip inflate/deflate │ │ │ ├── ZlibCompression.java # Pre-sized zlib deflate │ │ │ └── exception/ │ │ │ └── CompressionException.java │ │ ├── io/ │ │ │ ├── ByteArrayDataInput.java # Zero-copy byte array reading │ │ │ └── ByteArrayDataOutput.java # Zero-copy byte array writing │ │ ├── ArrayUtil.java # Array operations │ │ ├── CharUtil.java # Character utilities │ │ ├── ClassUtil.java # Reflective class operations │ │ ├── ExceptionUtil.java # Exception handling helpers │ │ ├── LogUtil.java # Logging convenience methods │ │ ├── NumberUtil.java # Numeric parsing and validation │ │ ├── PrimitiveUtil.java # Boxing/unboxing, type checks │ │ ├── Range.java # Bounded numeric intervals │ │ ├── RegexUtil.java # Pattern matching helpers │ │ ├── StringUtil.java # String manipulation │ │ ├── SystemUtil.java # System-level operations │ │ ├── mutable/ # Mutable, MutableInt, MutableLong, │ │ │ # MutableDouble, MutableFloat, │ │ │ # MutableByte, MutableShort, MutableBoolean │ │ └── time/ │ │ ├── SimpleDate.java # Date formatting │ │ └── Stopwatch.java # Elapsed time measurement │ └── test/java/ # JUnit 5 tests ├── build.gradle.kts ├── settings.gradle.kts └── LICENSE.md
Build the project using the Gradle wrapper:
./gradlew buildRun tests:
./gradlew testSee CONTRIBUTING.md for development setup, code style guidelines, and how to submit a pull request.
This project is licensed under the Apache License 2.0 - see LICENSE.md for the full text.
| Back | FazBrowse Home | New Git URL |