aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/common/nio/MappedByteBufferInputStream.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-01-23 20:32:50 +0100
committerSven Gothel <[email protected]>2023-01-23 20:32:50 +0100
commit042ff8177884b6af1543622c63c917886798b119 (patch)
tree6d97906a56f747bc6454c6f30bc8145ba19c60ac /src/java/com/jogamp/common/nio/MappedByteBufferInputStream.java
parent9fc572089e533a15c23a7b9d4a17119d5519f3c2 (diff)
MappedByteBufferInputStream: Reduce dependency to Platform
Diffstat (limited to 'src/java/com/jogamp/common/nio/MappedByteBufferInputStream.java')
-rw-r--r--src/java/com/jogamp/common/nio/MappedByteBufferInputStream.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/java/com/jogamp/common/nio/MappedByteBufferInputStream.java b/src/java/com/jogamp/common/nio/MappedByteBufferInputStream.java
index 6a56d6e..f0bf321 100644
--- a/src/java/com/jogamp/common/nio/MappedByteBufferInputStream.java
+++ b/src/java/com/jogamp/common/nio/MappedByteBufferInputStream.java
@@ -38,9 +38,10 @@ import java.nio.MappedByteBuffer;
import java.nio.channels.FileChannel;
import java.nio.channels.FileChannel.MapMode;
-import jogamp.common.Debug;
+import com.jogamp.common.os.Platform.OSType;
-import com.jogamp.common.os.Platform;
+import jogamp.common.Debug;
+import jogamp.common.os.PlatformPropsImpl;
/**
* An {@link InputStream} implementation based on an underlying {@link FileChannel}'s memory mapped {@link ByteBuffer},
@@ -136,8 +137,7 @@ public class MappedByteBufferInputStream extends InputStream {
static final boolean DEBUG;
static {
- Platform.initSingleton();
- if( Platform.is32Bit() ) {
+ if( PlatformPropsImpl.CPU_ARCH.is32Bit ) {
DEFAULT_SLICE_SHIFT = 29;
} else {
DEFAULT_SLICE_SHIFT = 30;
@@ -366,7 +366,7 @@ public class MappedByteBufferInputStream extends InputStream {
currentPosition = -1L;
}
if( fc.size() != newTotalSize ) {
- if( Platform.OSType.WINDOWS == Platform.getOSType() ) {
+ if( OSType.WINDOWS == PlatformPropsImpl.OS_TYPE ) {
// On Windows, we have to close all mapped slices.
// Otherwise we will receive:
// java.io.IOException: The requested operation cannot be performed on a file with a user-mapped section open