Class NSData

    • Constructor Detail

      • NSData

        public NSData()
      • NSData

        public NSData​(NSData data)
      • NSData

        public NSData​(byte[] bytes)
      • NSData

        public NSData​(java.nio.ByteBuffer bytes)
      • NSData

        public NSData​(org.robovm.rt.bro.ptr.BytePtr bytes,
                      int length,
                      boolean freeWhenDone)
      • NSData

        public NSData​(T structData)
    • Method Detail

      • getLength

        public long getLength()
      • getBytes0

        protected long getBytes0()
      • asByteBuffer

        public java.nio.ByteBuffer asByteBuffer()
      • getBytes

        public byte[] getBytes()
      • copy

        public int copy​(java.nio.ByteBuffer buffer,
                        int dataOffset,
                        int count)
      • copy

        public int copy​(byte[] buffer,
                        int bufferOffset,
                        int dataOffset,
                        int count)
      • getStructData

        public <T extends org.robovm.rt.bro.Struct<T>> T getStructData​(java.lang.Class<T> type)
      • read

        public static NSData read​(java.io.File file)
      • readMapped

        @Deprecated
        public static NSData readMapped​(java.io.File file)
        Deprecated.
        Deprecated in iOS 8.0.
        Since:
        Available in iOS 2.0 and later.
      • write

        public void write​(java.io.File file,
                          boolean useAuxiliaryFile)
      • getBytes

        protected void getBytes​(long buffer,
                                long length)
      • writeFile

        protected boolean writeFile​(java.lang.String path,
                                    boolean atomically)
      • write

        public boolean write​(NSURL url,
                             boolean atomically)
      • init

        protected long init​(long bytes,
                            long length)
      • init

        protected long init​(long bytes,
                            long length,
                            boolean b)
      • init

        protected long init​(NSData data)
      • readFile

        protected static NSData readFile​(java.lang.String path)
      • init

        protected long init​(java.lang.String base64String,
                            NSDataBase64DecodingOptions options)
        Since:
        Available in iOS 7.0 and later.
      • toBase64EncodedString

        public java.lang.String toBase64EncodedString​(NSDataBase64EncodingOptions options)
        Since:
        Available in iOS 7.0 and later.
      • readMappedFile

        @Deprecated
        protected static NSObject readMappedFile​(java.lang.String path)
        Deprecated.
        Deprecated in iOS 8.0. Use +dataWithContentsOfURL:options:error: and NSDataReadingMappedIfSafe or NSDataReadingMappedAlways instead.
        Since:
        Available in iOS 2.0 and later.