UnsafeHeapSwappedByteBuf Class — netty Architecture
Architecture documentation for the UnsafeHeapSwappedByteBuf class in UnsafeHeapSwappedByteBuf.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD d33cf6df_affc_8828_79d0_1667f5a8daef["UnsafeHeapSwappedByteBuf"] 629efb6e_de1f_fdbf_713d_9fc706868d89["UnsafeHeapSwappedByteBuf.java"] d33cf6df_affc_8828_79d0_1667f5a8daef -->|defined in| 629efb6e_de1f_fdbf_713d_9fc706868d89 239e7d98_4b2d_4753_6de6_bdbe5d832c30["UnsafeHeapSwappedByteBuf()"] d33cf6df_affc_8828_79d0_1667f5a8daef -->|method| 239e7d98_4b2d_4753_6de6_bdbe5d832c30 0c97ba50_c96d_b1a1_48af_79f16e1f95ee["idx()"] d33cf6df_affc_8828_79d0_1667f5a8daef -->|method| 0c97ba50_c96d_b1a1_48af_79f16e1f95ee d3bf3547_d360_5f56_9f74_3f5249ce7aba["_getLong()"] d33cf6df_affc_8828_79d0_1667f5a8daef -->|method| d3bf3547_d360_5f56_9f74_3f5249ce7aba dae3d196_65bd_bbc0_93ac_10c5101f3930["_getInt()"] d33cf6df_affc_8828_79d0_1667f5a8daef -->|method| dae3d196_65bd_bbc0_93ac_10c5101f3930 d03a81cc_d5db_64e2_1f5d_3aff8a7fa9c9["_getShort()"] d33cf6df_affc_8828_79d0_1667f5a8daef -->|method| d03a81cc_d5db_64e2_1f5d_3aff8a7fa9c9 cc0b682c_a259_5188_7ac3_0b4f007d2140["_setShort()"] d33cf6df_affc_8828_79d0_1667f5a8daef -->|method| cc0b682c_a259_5188_7ac3_0b4f007d2140 d11a1c73_e64d_fa1a_a8da_5b0d2d355d18["_setInt()"] d33cf6df_affc_8828_79d0_1667f5a8daef -->|method| d11a1c73_e64d_fa1a_a8da_5b0d2d355d18 b623da34_7a35_a514_369d_4c03b3a9f5f6["_setLong()"] d33cf6df_affc_8828_79d0_1667f5a8daef -->|method| b623da34_7a35_a514_369d_4c03b3a9f5f6
Relationship Graph
Source Code
buffer/src/main/java/io/netty/buffer/UnsafeHeapSwappedByteBuf.java lines 24–63
final class UnsafeHeapSwappedByteBuf extends AbstractUnsafeSwappedByteBuf {
UnsafeHeapSwappedByteBuf(AbstractByteBuf buf) {
super(buf);
}
private static int idx(ByteBuf wrapped, int index) {
return wrapped.arrayOffset() + index;
}
@Override
protected long _getLong(AbstractByteBuf wrapped, int index) {
return PlatformDependent.getLong(wrapped.array(), idx(wrapped, index));
}
@Override
protected int _getInt(AbstractByteBuf wrapped, int index) {
return PlatformDependent.getInt(wrapped.array(), idx(wrapped, index));
}
@Override
protected short _getShort(AbstractByteBuf wrapped, int index) {
return PlatformDependent.getShort(wrapped.array(), idx(wrapped, index));
}
@Override
protected void _setShort(AbstractByteBuf wrapped, int index, short value) {
PlatformDependent.putShort(wrapped.array(), idx(wrapped, index), value);
}
@Override
protected void _setInt(AbstractByteBuf wrapped, int index, int value) {
PlatformDependent.putInt(wrapped.array(), idx(wrapped, index), value);
}
@Override
protected void _setLong(AbstractByteBuf wrapped, int index, long value) {
PlatformDependent.putLong(wrapped.array(), idx(wrapped, index), value);
}
}
Source
Frequently Asked Questions
What is the UnsafeHeapSwappedByteBuf class?
UnsafeHeapSwappedByteBuf is a class in the netty codebase, defined in buffer/src/main/java/io/netty/buffer/UnsafeHeapSwappedByteBuf.java.
Where is UnsafeHeapSwappedByteBuf defined?
UnsafeHeapSwappedByteBuf is defined in buffer/src/main/java/io/netty/buffer/UnsafeHeapSwappedByteBuf.java at line 24.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free