Limiting file size creation with java
问题 Im trying to limit the size creation of one file in my java app. For that I made this sample code which I declare one variable lenght of 32 bytes, start WriteOnFile method looping it until 32 bytes. The problem is, it doesnt matter the value I set set on FILE_SIZE (Higher or lower) the download file is always coming with 400kb - that means my code is working since the original file is 200Mb but has some logic mistake. is there another way to do this? cos I based myself on this post How to