The verb "sein" (= to be) is special, both the "subject" and the "object" take the nominative case. It's sort of like how in older English they said "I am he" rather than "I am him".
So while "I have a liter" = "Ich habe einen Liter"
"This is a liter" = "Das ist ein Liter"
In colloquial German "dies" is definitely less common. So, if you use "dies" instead of "das" it sounds more nerdy or posh.
Other than that., if you use "dies" you'd probably be more likely to be pointing at the object than if you used "das", for instance, on a map or on a picture. "Dies ist mein Auto." - "This is my car" (pointing at a picture of it). But it's more common to say "Das ist mein Auto." whether it'd be in a picture or in real life.
Also, you use "dies" (or declinations of it) if you previously mentioned the object you're talking about.
For instance, say that with your first car you drove all around Europe. You'd introduce it with "Mein erstes Auto war ein Käfer" - "My first car was a beetle."
"Mit diesem Auto bin ich nach der Schule durch ganz Europa gefahren." - "With this car I drove through all of Europe right out of school."
A liter is a member of an ancient German tribe situated near the city of Munich. In the 19th century liters migrated to Munich in large numbers at the end of September to become steins. Steins are big mugs made of glazed clay that contain a liquid drink, mostly beer. A stein could hold about a quart of liquid. Nowadays steins hold a little less liquid than a quart, also known as a liter, stemming from said ancient German tribe. A liter of beer is a common expression on today's Munich Oktoberfest, where steins of beer are sold to tourists from all over the world.
For the second one, it is in the accusative case. 'Er' is the subject and 'Liter' is the direct object, therefore 'ein' becomes 'einen'. You can refer to this website if you are confused about how German cases work - http://www.jabbalab.com/blog/795/how-the-german-cases-work-nominative-accusative-dative-and-genitive