Guest User

Untitled

a guest
Jan 20th, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. Dim bytes() As Byte = File.ReadAllBytes(filePath)
  2. ' Modify and resize the bytes array
  3. File.WriteAllBytes(filePath)
  4.  
  5. Using input As New FileStream(inputFilePath, FileMode.Open)
  6. Using output As New FileStream(tempFilePath, FileMode.Create)
  7. Dim bytes(lengthOfMp3Record) As Byte
  8. Dim totalRead As Integer = 0
  9. Do
  10. totalRead = input.Read(bytes, 0, bytes.Length)
  11. If (totalRead <> 0) AndAlso (KeepMp3record(bytes)) Then
  12. output.Write(bytes, 0, totalRead)
  13. End If
  14. Loop While totalRead <> 0
  15. End Using
  16. End Using
  17. File.Delete(inputFilePath)
  18. File.Move(tempFilePath, inputFilePath)
Add Comment
Please, Sign In to add comment