Best code examples for Java 8 MappedByteBuffer class (java.nio.MappedByteBuffer)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 MappedByteBuffer class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Java 8 MappedByteBuffer examples from Open Source projects
This code example shows how to use the following methods: putLong, force
80:	MapedFile.clean(this.mappedByteBuffer); 
-
92:	this.mappedByteBuffer.putLong(0, this.physicMsgTimestamp); 
93:	this.mappedByteBuffer.putLong(8, this.logicsMsgTimestamp); 
94:	this.mappedByteBuffer.putLong(16, this.indexMsgTimestamp); 
95:	this.mappedByteBuffer.force(); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: putLong, force
80:	MapedFile.clean(this.mappedByteBuffer); 
-
92:	this.mappedByteBuffer.putLong(0, this.physicMsgTimestamp); 
93:	this.mappedByteBuffer.putLong(8, this.logicsMsgTimestamp); 
94:	this.mappedByteBuffer.putLong(16, this.indexMsgTimestamp); 
95:	this.mappedByteBuffer.force(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: position, get
70:	mappedByteBuffer.position(offset); 
-
72:	final byte data = mappedByteBuffer.get(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: position, putLong, force
64:	mappedStartPosition += mappedBuffer.position(); 
65:	mappedBuffer.force(); 
-
131:	(MAPPED_SIZE - mappedBuffer.position()) < 8 ) 
-
144:	mappedBuffer.putLong( l ); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: position, remaining, duplicate
116:	int remaining = buffer.remaining() - position; 
-
121:	ByteBuffer bytes = buffer.duplicate(); 
122:	bytes.position(buffer.position() + position).limit(buffer.position() + position + length); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: limit, position, remaining, isLoaded, load
91:	if (!map.isLoaded()) { 
92:	map.load(); 
-
94:	if (map.position() + n > map.limit()) { 
95:	long ret = map.remaining(); 
96:	map.position(map.limit()); 
-
99:	map.position((int) (map.position() + n)); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: flip, position, get, getInt, putInt
220:	mbb.putInt(1, 1); 
221:	mbb.position(50); 
222:	mbb.putInt(50); 
-
224:	mbb.flip(); 
225:	mbb.get(); 
226:	assertEquals(1, mbb.getInt()); 
-
228:	mbb.position(50); 
229:	assertEquals(50, mbb.getInt()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: rewind, putInt, putLong, force
142:	m_byteBuffer.rewind(); 
143:	m_byteBuffer.putInt(m_index); 
144:	m_byteBuffer.putLong(m_timestamp); 
-
147:	m_byteBuffer.force(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: remaining, get
185:	if (len > data.remaining()) { 
186:	written = data.remaining(); 
187:	data.get(buf, 0, written); 
-
189:	data.get(buf, written, (len - written)); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: putDouble
43:	buffer1.putDouble(0, 0.111); 
44:	buffer1.putDouble(chunkSize - 8, 1.222); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: position, get, put, force
118:	byte value = bb.get(pos); 
-
120:	bb.position(pos); 
121:	bb.put(value); 
122:	bb.force(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: force
76:	buffer.force(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: remaining, get
185:	 
186:	}// readUint() 
187:	 
-
189:	 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: position, get, getInt, getShort, order
227:	if (fmap.get(ELFIdentification.EI_MAG0.value()) != 0x7f || 
228:	fmap.get(ELFIdentification.EI_MAG1.value()) != 'E' || 
229:	fmap.get(ELFIdentification.EI_MAG2.value()) != 'L' || 
230:	fmap.get(ELFIdentification.EI_MAG3.value()) != 'F') { 
-
234:	ei_class = EI_Class.valueOf(fmap.get(ELFIdentification.EI_CLASS.value())); 
235:	ei_data = EI_Data.valueOf(fmap.get(ELFIdentification.EI_DATA.value())); 
236:	ei_version = fmap.get(ELFIdentification.EI_VERSION.value()); 
-
239:	fmap.order(ByteOrder.LITTLE_ENDIAN); 
-
241:	fmap.order(ByteOrder.BIG_ENDIAN); 
-
244:	fmap.position(ELFIdentification.EI_NIDENT.value()); 
245:	e_type = E_Type.valueOf(fmap.getShort()); 
246:	e_machine = E_Machine.valueOf(fmap.getShort()); 
247:	e_version = E_Version.valueOf(fmap.getInt()); 
248:	e_entry = fmap.getInt(); 
249:	e_phoff = fmap.getInt(); 
250:	e_shoff = fmap.getInt(); 
251:	e_flags = fmap.getInt(); 
252:	e_ehsize = fmap.getShort(); 
253:	e_phentsize = fmap.getShort(); 
254:	e_phnum = fmap.getShort(); 
255:	e_shentsize = fmap.getShort(); 
256:	e_shnum = fmap.getShort(); 
257:	e_shstrndx = fmap.getShort(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: force
90:	this.mappedByteBuffer.force(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: position, get
70:	mappedByteBuffer.position(offset); 
-
72:	final byte data = mappedByteBuffer.get(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: clear
57:	foc.write(mbuf); 
-
60:	mbuf.clear(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: hasRemaining
104:	if (mbb.hasRemaining()) { 
-
106:	channel.write(mbb); 
-
112:	if (!mbb.hasRemaining()) { 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: asReadOnlyBuffer, load
65:	fileBuffer.load(); 
-
67:	buffer = fileBuffer.asReadOnlyBuffer(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: capacity, position, remaining, force
92:	buf.force(); 
-
95:	final int position = buf.position(); 
96:	buf = channel.map(FileChannel.MapMode.READ_WRITE, 0, buf.capacity() + (getMemoryMapSize() * factor)); 
-
104:	if(buf.remaining() < len) { 
-
106:	increaseSize(len - buf.remaining()); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: force
574:	mIndexBuffer.force(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: order
30:	map.order(ByteOrder.LITTLE_ENDIAN); 
-
32:	Visitor v = new Visitor(map); 
-
38:	Scanner s = new Scanner(map); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: capacity, position, remaining, force
92:	buf.force(); 
-
95:	final int position = buf.position(); 
96:	buf = channel.map(FileChannel.MapMode.READ_WRITE, 0, buf.capacity() + (getMemoryMapSize() * factor)); 
-
115:	if(buf.remaining() < 1) { 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: isLoaded, load
171:	if (!mapFile.isLoaded()) 
172:	mapFile.load(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: position, remaining, duplicate
116:	int remaining = buffer.remaining() - position; 
-
121:	ByteBuffer bytes = buffer.duplicate(); 
122:	bytes.position(buffer.position() + position).limit(buffer.position() + position + length); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: clear
60:	foc.write(mbuf); 
-
63:	mbuf.clear(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: position, put
172:	int pos = _mmapBuffer.position(); 
173:	_mmapBuffer.put(data, offset, length); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: force
56:	bb.force(); 
Full Snippet Info
5
CodeRank
Related Java 8 MappedByteBuffer Questions & Answers:
See Code Examples for Java 8 MappedByteBuffer Methods: