Collin Smith
b573bd4fa7
Added programmic loading of log4j2 configuration file
...
Committing log4j2.xml with default settings (to be ammended)
2020-08-15 13:34:11 -07:00
Collin Smith
39227995a2
Added ItemWriter and item serialization support (see #93 )
...
Created ItemWriter Item serialization class
Removed skipping of property lists for BOOK item types
Added support for serializing PropertyList values
Added support for serializing RareQualityData values
Added support for serializing Stat values
2020-08-14 00:12:08 -07:00
Collin Smith
886c24cdfd
Improved API
...
writing 0 bits with _writeUnsigned is a no-op
write unsigned methods changed from byte and short to int types
added writeString(CharSequence,int,boolean) to write an optional null char
2020-08-14 00:08:07 -07:00
Collin Smith
fda76aad7a
Exposed ByteBuf for ByteInput and ByteOutput as a read-only view with doc
2020-08-13 18:06:54 -07:00
Collin Smith
1fcd8b7a4d
Renamed ItemSerializer to ItemReader to allow room for ItemWriter counterpart
2020-08-13 17:43:55 -07:00
Collin Smith
a3073167a6
Fixed bug where readSafe operations were incrementing bits erroneously
2020-08-13 17:40:25 -07:00
Collin Smith
322b94bc8c
Added item name along with item code for clarity
2020-08-13 00:22:05 -07:00
Collin Smith
a2d8157987
Created SignatureMismatch exception to better describe that case
2020-08-13 00:10:10 -07:00
Collin Smith
5560eb2b3f
Moved BitUtils#readSignature to ByteInput
...
ByteInput#readSignature behaves similarly, except mismatch will reset position to before reading
2020-08-12 23:59:25 -07:00
Collin Smith
5dd29339fc
Implemented ByteInput#realign
2020-08-12 23:58:03 -07:00
Collin Smith
c0ef2dcb8a
Refactored com.riiablo.item to use com.riiablo.io for data streams
...
Temp workarounds implemented for Item#loadFromStream and ItemSerializer#readSingleItem
2020-08-12 23:23:40 -07:00
Collin Smith
cafe8679b4
Added support for marking read position for debugging
2020-08-12 17:22:55 -07:00
Collin Smith
d70668d11d
Added InvalidFormat
...
Added deprecated constructor for InvalidFormat with a null ByteInput for temp back compat
2020-08-12 15:05:10 -07:00
Collin Smith
088cde3b9e
Ranamed SafeUnsigned to UnsafeNarrowing
2020-08-11 17:56:40 -07:00
Collin Smith
d8679e34e1
Committing BitUtils and SafeUnsigned
2020-08-11 01:07:35 -07:00
Collin Smith
e3fc03f240
Adjusted documentation and added ByteInput#readString(int,boolean)
2020-08-11 01:03:05 -07:00
Collin Smith
efce34ef8a
Renamed len to maxLen
2020-08-11 00:55:04 -07:00
Collin Smith
8b31ee02a1
Bugfix
2020-08-11 00:28:59 -07:00
Collin Smith
e7ab37c01c
Added methods to safely read unsigned values in their java signed limits
2020-08-11 00:24:53 -07:00
Collin Smith
871cadaa2b
Moved BitConstraints#isUnsigned to BitUtils
2020-08-10 21:22:26 -07:00
Collin Smith
90564f39a3
Committing JUnit tests for BitOutput and interoperability
2020-08-10 18:43:01 -07:00
Collin Smith
9b0a3cf498
Filled remaining methods and changed write methods to support chaining
2020-08-10 18:35:45 -07:00
Collin Smith
8941ceee6e
Implemented BitOutput#skipBits(long) and ByteOutput#skipBytes(int)
2020-08-10 18:34:54 -07:00
Collin Smith
984a0864ea
Implemented writeString(CharSequence,int)
2020-08-10 18:34:12 -07:00
Collin Smith
2433fac1fe
Implemented writeBoolean(boolean) and write1(int) methods to write a single bit
2020-08-10 18:33:40 -07:00
Collin Smith
4a00f0207f
Relaxed requirements to allow writing 0 bits (a no-op)
2020-08-10 18:32:57 -07:00
Collin Smith
043e032ec5
Added getter for ByteInput ByteBuf for testing
2020-08-10 18:32:13 -07:00
Collin Smith
43b2eda1c6
Added method chaining support
2020-08-10 17:35:22 -07:00
Collin Smith
74d980319a
Cleaned up flush and align methods
...
flush write cache and then erases it
align performs a flush and returns ByteOutput view
Reduced visibility of writeSigned and writeUnsigned
Implemented write signed methods
Implemented writeRaw method
Added getters for bitsCached and cache fields with package visibility
2020-08-10 01:49:36 -07:00
Collin Smith
66840f94d7
Refactored _writeUnsigned with _writeRaw with unsigned bit limits
2020-08-09 23:11:48 -07:00
Collin Smith
f901989e14
Implemented _writeRaw(long,int)
2020-08-09 23:05:38 -07:00
Collin Smith
11555397e3
Created ByteOutput and BitOutput
2020-08-09 20:06:06 -07:00
Collin Smith
4e2cd665cd
Made bitsToAdd final
2020-08-09 20:05:44 -07:00
Collin Smith
f62c038ffe
Added BYTE_MASK const (0xFF)
2020-08-09 20:05:31 -07:00
Collin Smith
97ebbb1dbb
Additional assertion to validate invariants
2020-08-09 12:51:02 -07:00
Collin Smith
1b51043d7d
Moved UBITS consts to BitConstants
2020-08-09 12:48:33 -07:00
Collin Smith
a9d33c2de8
Pulled unsigned masks out to BitConstants class
2020-08-08 23:06:36 -07:00
Collin Smith
c2ce0a3179
Added string reason for shift assertion failure
2020-08-08 17:53:50 -07:00
Collin Smith
7ed92b1f49
Replaced com.riiablo.io classes with com.riiablo.io.nio classes
2020-08-08 14:49:23 -07:00
Collin Smith
c8b74fccbf
Commented out comments -- linter was thinking this class was deprecated
2020-08-08 14:46:32 -07:00
Collin Smith
acdbace5ea
Deprecated and removed multi-byte read methods from BitInput
...
Unaligned multi-byte read operations shouldn't align stream
Implementing unaligned multi-byte read support is required
2020-08-08 14:40:11 -07:00
Collin Smith
7006ce9dc0
Added ByteBuf read-only invariant
2020-08-08 14:29:33 -07:00
Collin Smith
683d592c55
Created placeholder documentation to document relationship between input classes
2020-08-08 14:26:25 -07:00
Collin Smith
83ead2a990
Reduced #bitInput() method visibility -- unalign should be used instead outside of package
2020-08-08 14:24:47 -07:00
Collin Smith
f7a38d5e15
Documented ByteInput#bitInput(BitInput) invariants
2020-08-08 14:18:33 -07:00
Collin Smith
75ac29d698
Created bitInput() accessor to manage BitInput initialization and access
2020-08-08 14:15:51 -07:00
Collin Smith
20ae623fe7
Tightened up field visibility
...
Tightened up field visibility
ByteInput#bitInput set via bitInput(BitInput) which enforces invariants
2020-08-08 14:08:26 -07:00
Collin Smith
afd7bafa12
Fixed skipBits multi-byte using unaligned bit stream
2020-08-08 13:17:59 -07:00
Collin Smith
e62d3ec383
ByteInput#skipBytes now increments bitsRead
2020-08-08 12:04:51 -07:00
Collin Smith
99f0c11064
Created static factory method for constructing a BitInput from a byte array
2020-08-08 11:50:59 -07:00