Accessing GTFS Real-time bus position feed using FeedMessage Class


#1

I tried to access the real-time bus position data using FeedMessage class in java as a
FeedMessage feed = FeedMessage.parseFrom(conn.GetInputStream()); but I am getting an error something not wired type.

I can get the Feed data using BufferedReader but then I can’t use feed object to extract the information from stream feed.
Has someone use the above method to get the feed object ?
How to get GTFS real-time bus position feed in the form of a Protocol Buffer stream ?