java - BufferedinputStream default buffer size -


bufferedinputstream default buffer size 8k jvm. harcoded value, or can changed altering system parameter?

i'd use 128k without modifying java code. possible?

thanks,

there no way change default buffer size system property. must use constructor accepts size argument. place buffer created in constructor:

public bufferedinputstream(inputstream in, int size) {     super(in);     if (size <= 0) {         throw new illegalargumentexception("buffer size <= 0");     }     buf = new byte[size]; } 

this applies jvm version (1.8.0_31) possibly different on other implementations.


Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -