Data Mining

Download Free Data Mining Source Code In C/C++, C#, Visual Basic, Visual Basic.NET, Java,
and other programming languages
Welcome to Data Mining Sign in | Join | Help
in Search

Data Mining Source Code Newsletter

Business Analyst Training
Live, Online, Video Courses
Instructor-Led + Hands-On
BusinessAnalystBootCamp.Com

SQL + Database Training
Live, Online, Video Classes
Instructor-Led + Hands-On
SQLBootCamp.Com

Software Developer Training
Live, Online, Video Courses
Instructor-Led + Hands-On
SoftwareDevelperBootCamp.Com

IT CAREER COACH
Hands-On Experience Coaching
IT Skills Training
IT-Career-Coach.NET

IT Professional Newsletter
"Free" IT Career Success Tips
How To Accelerate Your Career
IT Career Newsletter

Ask IT Career Questions
"ASK" A Burning IT Career
Question Or Get Answers
Ask A Burning IT Question Now!

Announcing The Data Mining Source Code Newsletter!

Subscribe By Email | Subscribe By RSS Feed

Binary Data - Convert ASCII Characters In A Byte Array To String

Last post 01-20-2005, 18:44 by AST867. 5 replies.
Sort Posts: Previous Next
  •  01-20-2005, 14:15 3871

    Binary Data - Convert ASCII Characters In A Byte Array To String

    I'm trying to load an array of bytes with a file and search for a string, but I cannt find a way to do that. I've been stuck on this for a while now, so any thoughts or help would be appreciatedTongue Tied
  •  01-20-2005, 14:47 3872 in reply to 3871

    RE: Binary Data - Convert ASCII Characters In A Byte Array To String

    Can you post a sample of the code that you are having trouble with?

    Thanks



    Sign-up For Data Mining Source Code Newsletter

  •  01-20-2005, 14:59 3873 in reply to 3871

    RE: Binary Data - Convert ASCII Characters In A Byte Array To String

    Dim Byt as byte()
    Dim
    objBr As New BinaryReader(File.OpenRead(NewPath))

    Byt = objBr.ReadBytes(objBr.BaseStream.Length)
    objBr.Close()

    now I'm trying to search for a string like "ASD" in Byt, or divide the Byt into smaller peices...

  •  01-20-2005, 17:42 3874 in reply to 3873

    RE: Binary Data - Convert ASCII Characters In A Byte Array To String

            Dim Byt As Byte()
            Dim objBr As New System.IO.BinaryReader(File.OpenRead("C:\ReadMe.txt"))

            Byt = objBr.ReadBytes(objBr.BaseStream.Length)
            objBr.Close()

            Dim encoding As ASCIIEncoding = New ASCIIEncoding

            Dim text As String = encoding.GetString(Byt)



    Sign-up For Data Mining Source Code Newsletter

  •  01-20-2005, 18:16 3875 in reply to 3871

    Re: Binary Data - Convert ASCII Characters In A Byte Array To String

    Thank You, all try itBig Smile
  •  01-20-2005, 18:44 3876 in reply to 3875

    Re: Binary Data - Convert ASCII Characters In A Byte Array To String

    The problem is that I'm trying to make a file splitter and if I convert the exe file to text and convert it back to bytes the exe file wont work.Sad

Announcing The Data Mining Source Code Newsletter!

Subscribe By Email | Subscribe By RSS Feed