title: How can i play a video in chunks of bytes?
body: <p>I want to play a video in android,which i had saved in my assets folder.
  I have changed it into a byte array and it is playing successfully,using the below code</p>
  
  <pre><code>private String getDataSource() throws IOException {
  
      InputStream stream = getAssets().open("famous.3gp");
  
                if (stream == null)
          throw new RuntimeException("stream is null");
  
                  File temp = File.createTempFile("test", "mp4");
  
         temp.deleteOnExit();
  
                 String tempPath = temp.getAbsolutePath();
  
      int totalRead = 0;
      int bytesToRead = 1 * 1024;
      FileOutputStream out = new FileOutputStream(temp);
      byte buf[] = new byte[128];
      int numread = 0;
  
              do {
          numread = stream.read(buf);
          totalRead += numread;
          if (numread &lt;= 0)
              break;
          out.write(buf, 0, numread);
      } while (totalRead&lt;bytesToRead);
  
          try {
          stream.close();
        } catch (IOException ex) {
          Log.e("mini", "error: " + ex.getMessage(), ex);
        }
  
          return tempPath;
  
           // }
  
       }
  </code></pre>
  
  <p>and in oncreate</p>
  
  <pre><code> videoView.setVideoPath(getDataSource());
  </code></pre>
  
  <p>But my requirement is, i want to play like, first 100 bytes from the array, and when it is finished ,play next 100 bytes in sequence and then another 100 like this.</p>