requirement is to read message from IConsoleConstants.ID_CONSOLE_VIEW and write it into text file.
I don't think you will be able to retreive a direct stream to read the console content. Note also that the console view may have multiple different consoles, you will have to retrieve the good one.
Retrieving the content displayed in a single console should be possible going through the IDocument of a TextConsole. You can get the whole text content. You could also have a look to the IDocumentListener if you can be notified of changes. Another solution should be to go with a PatternMatchListener of the TextConsole directly. Anyway I don't think there is a direct solution to do this with the Eclipse console API.
Say myConsole (of type MessageConsole) is the reference to your console. The below code will give you the required.
myConsole.getDocument().get();