mirror of
https://github.com/corda/corda.git
synced 2025-01-22 12:28:11 +00:00
Merge branch 'master' of dice:git/vm
This commit is contained in:
commit
fb36d7c605
@ -19,6 +19,19 @@ public class ByteArrayInputStream extends InputStream {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int read(byte[] buffer, int offset, int bufferLength) {
|
||||||
|
if (position >= length) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
int remaining = length-position;
|
||||||
|
if (remaining < bufferLength) {
|
||||||
|
bufferLength = remaining;
|
||||||
|
}
|
||||||
|
System.arraycopy(array, position, buffer, offset, bufferLength);
|
||||||
|
position += bufferLength;
|
||||||
|
return bufferLength;
|
||||||
|
}
|
||||||
|
|
||||||
public int available() {
|
public int available() {
|
||||||
return length - position;
|
return length - position;
|
||||||
}
|
}
|
||||||
|
@ -201,4 +201,8 @@ public class ByteBuffer {
|
|||||||
if (position < 0 || position+amount > limit)
|
if (position < 0 || position+amount > limit)
|
||||||
throw new IndexOutOfBoundsException();
|
throw new IndexOutOfBoundsException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String toString() {
|
||||||
|
return "(ByteBuffer with array: " + array + " arrayOffset: " + arrayOffset + " position: " + position + " remaining; " + remaining() + ")";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
2
makefile
2
makefile
@ -326,7 +326,9 @@ ifeq ($(platform),windows)
|
|||||||
else
|
else
|
||||||
$(cc) $(^) $(lflags) -o $(@)
|
$(cc) $(^) $(lflags) -o $(@)
|
||||||
endif
|
endif
|
||||||
|
ifneq ($(platform),darwin)
|
||||||
@$(strip) --strip-all $(@)
|
@$(strip) --strip-all $(@)
|
||||||
|
endif
|
||||||
@$(show-size) $(@)
|
@$(show-size) $(@)
|
||||||
|
|
||||||
$(generator): $(generator-objects)
|
$(generator): $(generator-objects)
|
||||||
|
Loading…
Reference in New Issue
Block a user