memory « API « Java I/O Q&A





1. Where is the content of a java piped stream 'stored'?    stackoverflow.com

I am running my application under a profiler. The 'class' that has the most memory consumption is the 'char[]' which is about 10kB in my application. I then created an InputStream (PipedInputStream ...

2. can java inputstream read files that are being updated in memory?    stackoverflow.com

Rather reading the file from harddisk.

3. RandomAccessFile Memory Leak    stackoverflow.com

I am using RandomAccessFile in java. I have a memory leak problem. I have simplified my code to the following:

public static void main(String[] args) throws IOException, InterruptedException
{
    RandomAccessFile ...

4. Memory issues with InputStream in Java    stackoverflow.com

I need to read a file into an array of Bytes.The entire file needs to be read into the array. The problem is I am getting an OutOfMemory Error since the ...

5. FileInputStream Memory Leak in file read loop    stackoverflow.com

we're facing a memory leak using a simple, simple, simple code as follows. The code is intended to get files from a source, use each file to do something and go on. This ...

6. Reduce memory imprint when Java application reads gigantic file in chunks    stackoverflow.com

I am creating an application to upload data to a server. The data will be pretty huge, up to 60-70gb. I am using java since I need it to run in ...

7. What's holding up my ByteBuffer from freeing?    stackoverflow.com

I'm allocating a lot of byte buffers. After I'm done with them I set all reference to null. This is supposedly the "correct" way to release bytebuffers? Dereference ...

8. Freeing up Memory from an inputstream?    stackoverflow.com

I'm pretty new to Java so bear with me here... I'm using a Scanner to read an InputStream (which is = Class.class.getResourceAsStream("fileName.csv")) . When the file is being read, the ...

9. Memory leak in ObjectOutputStream    coderanch.com





10. Out of memory on inputStream.read    coderanch.com

Well, obviously you are getting out of memory. In this case, incresing the size of the array is actually contributing to the problem. This is an error that happens when the JVM does not have any more memory to allocate an object, therefore, increasing the size of the array will no help. Maybe you can increase the maximum amount of memory ...

12. Convert InputStream to a File in Memory    coderanch.com

The first line of the File API: An abstract representation of file and directory pathnames. So a File is just a representation of a location (path) of the file on disk. If you have the data in memory, not disk, there is no associated path, and so no File can be made for it. So the real question is: What are ...

13. Out of memory error while converting string to stream    coderanch.com

I am getting an OutOfMemoryError from the following method. Please find the method and error below. This method is invoked 1000's of times within the project. So I am confused whether this error is because of the input string size or OR due to recursive invocation. public static InputStream stringToStream(String inputString) { InputStream inputStream = null; try { InputStream inputStream = ...

14. CPU memory and Memory Streaming.....    forums.oracle.com

How to get the CPU memory in JAVA?please send the sample code for that.., How to View the Memory Streaming(when do you do any process) in JAVA?please send the sample code for that.., How to Allocate the Memory for one Process and Remaining Memory for another Process in JAVA?please send the sample code for that..,

15. Reusing input streams - Running out of memory while reading multiple files    forums.oracle.com

Hello everybody I am making a program which shows thumbnails of several different image files. I read the original file, create the thumbnail and then I want to use the same inputstream to read a new file rather than creating a new stream every time. The problem now is that I am running out of memory extremely quickly. Basically what I ...





17. Memory: Words retriever with StreamTokenizer and Set    forums.oracle.com

Thanks DrLaszloJamf, But what is the memory size for distinct words? Of course each word has a rather small memory print, but I worry that the total of distinct words can make the size of the set gets pretty big. Unfortunately I don't have metric as the application will be run on other people computers. I believe that it should not ...

18. Why do I get Out of memory error with ByteBuffer.allocateDirect()?    forums.oracle.com

ByteBuffer buffer = ByteBuffer.allocateDirect((int) Math.pow(2,26)); } } I get this error java.lang.OutOfMemoryError: Direct buffer memory. Form my understanding of allocateDirect It should allocate space directly in the OS memory space and not in the JVM space. Why do I still get the Out of memory from the JVM I am using java 6 and eclipse 3.3.1 Thank you

19. Memory leak via object input stream (yes I'm resetting)    forums.oracle.com

I do have another memory leak in the system, what I am trying to determine from this post is if the way I am using read and write object may be contributing to that leak. I was hoping someone would be able to look at the communication code and let me know if I'm properly reseting the streams. Then at the ...

21. ObjectInputStream memory issue in 1.3    forums.oracle.com