Success is not doing extraordinary things but doing ordinary things extraordinarily well.
Originally posted by Joe Ess:
This reeks of "interview question".
Yes, there are numerous ways. How do you think the JVM does it? It can't very well use java library functions, can it?
Success is not doing extraordinary things but doing ordinary things extraordinarily well.
Originally posted by Saurabh Agrawal:
Thanks a lot for the reply. Yeah JVM also does it internally. One way i think is to make native calls to the C++ API but this will be wierd.This will again mean i am using an API.
I want to implement this.So can you please suggest me some options to make this happen.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by Ilja Preuss:
Please first explain why do you want to do this. Where is the requirement coming from? That will help us understand what suggestions would be valid.
Success is not doing extraordinary things but doing ordinary things extraordinarily well.
Originally posted by Srinivas Kalvala:
Hello,
If you see the java source code, for FileInputStream write and write bytes methods,
/**
* Writes the specified byte to this file output stream. Implements
* the <code>write</code> method of <code>OutputStream</code>.
*
* @param b the byte to be written.
* @exception IOException if an I/O error occurs.
*/
public native void write(int b) throws IOException;
/**
* Writes a sub array as a sequence of bytes.
* @param b the data to be written
* @param off the start offset in the data
* @param len the number of bytes that are written
* @exception IOException If an I/O error has occurred.
*/
private native void writeBytes(byte b[], int off, int len) throws IOException;
So its clear.
More inputs are welcome.![]()
Success is not doing extraordinary things but doing ordinary things extraordinarily well.
Success is not doing extraordinary things but doing ordinary things extraordinarily well.
Don't get me started about those stupid light bulbs. |