java.创建一个byte数组,long length = file.length(); byte[] bytes =
来源:学生作业帮 编辑:拍题作业网作业帮 分类:综合作业 时间:2024/05/29 17:51:49
java.创建一个byte数组,long length = file.length(); byte[] bytes = new byte[(int)length]; 结果导致
问题错误为:java.lang.OutOfMemoryError:Java heap space
\x05at com.hitrust.FCBCNB.service.impl.MONServiceImpl.getBytesFromFile(MONServiceImpl.java:76)
\x05at com.hitrust.FCBCNB.service.impl.MONServiceImpl.spliteBytes(MONServiceImpl.java:97)
\x05at com.hitrust.FCBCNB.service.impl.MONServiceImpl.getFileLine(MONServiceImpl.java:59)
\x05at com.hitrust.FCBCNB.service.impl.MONServiceImpl.upload(MONServiceImpl.java:45)
\x05at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
\x05at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
\x05at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
\x05at java.lang.reflect.Method.invoke(Method.java:597)
\x05at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:287)
\x05at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
\x05at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
\x05at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
\x05at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
\x05at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
\x05at $Proxy6.upload(Unknown Source)
\x05at com.hitrust.FCBCNB.test.MonTest.testA(MonTest.java:30)
\x05at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
\x05at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
\x05at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
\x05at java.lang.reflect.Method.invoke(Method.java:597)
\x05at junit.framework.TestCase.runTest(TestCase.java:154)
\x05at junit.framework.TestCase.runBare(TestCase.java:127)
\x05at junit.framework.TestResult$1.protect(TestResult.java:106)
\x05at junit.framework.TestResult.runProtected(TestResult.java:124)
\x05at junit.framework.TestResult.run(TestResult.java:109)
\x05at junit.framework.TestCase.run(TestCase.java:118)
\x05at junit.framework.TestSuite.runTest(TestSuite.java:208)
\x05at junit.framework.TestSuite.run(TestSuite.java:203)
\x05at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
\x05at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
\x05at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
\x05at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
请问该如何解决,这里的length大小为150994943.
问题错误为:java.lang.OutOfMemoryError:Java heap space
\x05at com.hitrust.FCBCNB.service.impl.MONServiceImpl.getBytesFromFile(MONServiceImpl.java:76)
\x05at com.hitrust.FCBCNB.service.impl.MONServiceImpl.spliteBytes(MONServiceImpl.java:97)
\x05at com.hitrust.FCBCNB.service.impl.MONServiceImpl.getFileLine(MONServiceImpl.java:59)
\x05at com.hitrust.FCBCNB.service.impl.MONServiceImpl.upload(MONServiceImpl.java:45)
\x05at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
\x05at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
\x05at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
\x05at java.lang.reflect.Method.invoke(Method.java:597)
\x05at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:287)
\x05at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
\x05at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
\x05at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
\x05at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
\x05at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
\x05at $Proxy6.upload(Unknown Source)
\x05at com.hitrust.FCBCNB.test.MonTest.testA(MonTest.java:30)
\x05at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
\x05at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
\x05at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
\x05at java.lang.reflect.Method.invoke(Method.java:597)
\x05at junit.framework.TestCase.runTest(TestCase.java:154)
\x05at junit.framework.TestCase.runBare(TestCase.java:127)
\x05at junit.framework.TestResult$1.protect(TestResult.java:106)
\x05at junit.framework.TestResult.runProtected(TestResult.java:124)
\x05at junit.framework.TestResult.run(TestResult.java:109)
\x05at junit.framework.TestCase.run(TestCase.java:118)
\x05at junit.framework.TestSuite.runTest(TestSuite.java:208)
\x05at junit.framework.TestSuite.run(TestSuite.java:203)
\x05at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
\x05at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
\x05at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
\x05at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
请问该如何解决,这里的length大小为150994943.
好恐怖的长度
java.创建一个byte数组,long length = file.length(); byte[] bytes =
byte
java中二维数组b[i].length表示什么意思
=(a.length
1M=?BIT=?BYTE,M/BIT/BYTE他们之间的关系和含义
output += input[input.Length -
for (var i = 0,length = this.length >>> 0; i < length; i++)
Java编程.int index=str.length()-1;index>=0;index--.比如.给个例子.
java中求二维数组第二维的长度用什么?另外,一个二维array, array.length默认的是第一维的长度么,有没
在Java程序中有定义:int x[][]=new int[4][5];则x.length和x[3].length的值分
英语翻译at first byte=at first sight吗?
1位元(bit)=多少 位元组(Byte)