#fixed code
                             public static byte[] readBytes(InputStream in, boolean isCloseStream) throws IORuntimeException {
		final InputStream availableStream = toAvailableStream(in);
		try{
			final int available = availableStream.available();
			if(available > 0){
				byte[] result = new byte[available];
				//noinspection ResultOfMethodCallIgnored
				availableStream.read(result);
				return result;
			}
		} catch (IOException e){
			throw new IORuntimeException(e);
		}
		return new byte[0];
	}
#vulnerable code 
                             public static byte[] readBytes(InputStream in, boolean isCloseStream) throws IORuntimeException {
		final FastByteArrayOutputStream out = new FastByteArrayOutputStream();
		copy(in, out);
		if (isCloseStream) {
			close(in);
		}
		return out.toByteArray();
	} 
                            #location 7 
                            #vulnerability type RESOURCE_LEAK